I currently have two supported languages: English and Spanish. Thus I have two main.strings
files for each language. One in en.lproj
and one in es.lproj
.
What I want now is that the English main.strings
is the default file if a user with a locale other than en
or es
arrives at the application, e.g. de
or fr
.
I know I can set it manually for each string in the code with the defaultString
parameter:
NSLocalizedStringWithDefaultValue(key, @"main",[NSBundle mainBundle], defaultString, comment);
But I would prefer to not enter it there again (and have to change it at two places), but rather have the en
main.strings
file as a default for any other "unsupported" locale.
What I want now is that the English main.strings is the default file if a user with a locale other than en or es arrives at the application, e.g. de or fr.
Did you try that? I’m almost certain the application will fall back to the English locale without you doing anything at all. Even the system dialogs will come up in English unless your application explicitly supports the current locale.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With