Open palficsabapeter opened 3 years ago
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" }
{ "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"
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.
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.