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

Add support for translation context #63

Open
palficsabapeter opened this issue Mar 1, 2021 · 0 comments
Open

Add support for translation context #63

palficsabapeter opened this issue Mar 1, 2021 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@palficsabapeter
Copy link
Member

In certain situations, providing context for a different translation would come in handy. One example is gender specific translation.

An example from i18next.com to illustrate the problem:
{ "friend": "A friend", "friend_male": "A boyfriend", "friend_female": "A girlfriend" }

Usage:
i18next.t('friend'); // -> "A friend" i18next.t('friend', { context: 'male' }); // -> "A boyfriend" i18next.t('friend', { context: 'female' }); // -> "A girlfriend"

It would be cool if the library had a similar feature.

@palficsabapeter palficsabapeter changed the title Add support for localization context Add support for translation context Mar 1, 2021
@pogiedoge pogiedoge added the enhancement New feature or request label Mar 16, 2021
@pogiedoge pogiedoge added this to the 0.4.0 milestone Mar 16, 2021
@pogiedoge pogiedoge assigned pogiedoge and unassigned pogiedoge Mar 16, 2021
@pogiedoge pogiedoge modified the milestones: v0.4.0, v0.5.0 Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants