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

Setting default language to 'dev' #199

Closed
zync-dreifschneider opened this issue Aug 23, 2022 · 3 comments
Closed

Setting default language to 'dev' #199

zync-dreifschneider opened this issue Aug 23, 2022 · 3 comments

Comments

@zync-dreifschneider
Copy link

zync-dreifschneider commented Aug 23, 2022

Do you have a documentation issue?

In the fallback section you describe that you set the default language to 'dev', however it is set to 'en-AU'. Is this a mistake or is the usual developer language 'en-AU'? I also see that in this documentation there is explicitly a 'dev' language set, so I think it must be changed: https://www.i18next.com/overview/configuration-options

The default is set to dev which means developer language. At first this might look strange to set the default to a language, but this enables to set the saveMissing feature to send new keys to that developer specific language. From there your translators can modify the texts to a translation file containing, for instance, proper English, including defined terminology. For production use, just set fallbackLng to an existing language.

Do you have a technical/code issue?

No technical issue

You have already researched for similar issues?

No issues found

Are you sure this is an issue with i18next or are you just looking for some help?

I think it is an issue with the documentation

Documentation issue

Correct the setting of default language to 'dev' instead of using 'en-AU'.
https://www.i18next.com/principles/fallback#fallback-to-different-languages

// finally, developer language
-     fallbacks.push('en-AU');
+    fallbacks.push('dev');
    return fallbacks;

Motivation

It was confusing for me in the first glance to understand why you describe to set it to 'dev' but on the other way you set it to 'en-AU'.

@adrai
Copy link
Member

adrai commented Aug 23, 2022

It may be I misunderstand, but that's just an example for a custom fallbackLng function.
'dev' is the default: https://github.com/i18next/i18next/blob/master/src/defaults.js#L8

@adrai
Copy link
Member

adrai commented Aug 23, 2022

ahh, now I know what you mean

@adrai
Copy link
Member

adrai commented Aug 23, 2022

@adrai adrai closed this as completed Aug 23, 2022
pedrodurek pushed a commit to pedrodurek/i18next-gitbook that referenced this issue Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants