Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge multiple keys #230

Open
francescofact opened this issue Jun 29, 2021 · 1 comment
Open

Merge multiple keys #230

francescofact opened this issue Jun 29, 2021 · 1 comment

Comments

@francescofact
Copy link

I have a long document with a lot of
"A", "Select A"
"B", "Select B",
...

Is it possible to specify something like data-i18n="SELECT+A" instead of creating all these duplicate key for every selection?
Thank you

@bhubneshmaharana
Copy link

can you pls share or specify which document section you are taking about

Abhinob-Bora added a commit to Abhinob-Bora/jquery.i18n that referenced this issue Jan 23, 2024
Update index.html

Pull Request Summary: Dynamic Internationalization Keys

Overview:

This pull request introduces dynamic internationalization keys in the jQuery i18n demo. It allows using a data-i18n-key-prefix attribute on the <select> element and a data-i18n-key attribute on each <option>. This provides a more efficient way to handle translations for similar selections without duplicating keys.

Changes:
Added data-i18n-key-prefix to <select> for a common key prefix.
Added data-i18n-key to each <option> for unique identifiers.

Usage:

Set a common prefix with data-i18n-key-prefix.
Use data-i18n-key on each <option> for unique identifiers.

Benefits:

Cleaner internationalization for similar selections.
Avoids duplicate keys for each option.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants