base internationalization in xcode - xcode

I have a project using base internationalization and i add French in the localizations setting. Then i set my system language to French and launch my app, it detects the language and uses french resources; but when i set preferred language to French(Canada) and launch my app, it doesn't detect the language french and using my second preferred language (English).
In my last app which is not using a base internationalization, when i reproduce the above steps, all results are as expected. So anyone can tell me what's wrong with the base internationalization and how can i implement with base internationalization as below:
fr --> using fr resources
fr-CA --> still using fr resources

Related

Alter Multilingual App Toolkit source language

So I understand how Multilingual App Toolkit 4.0 works and it works great for my Xamarin.Android project. The default language is English, and with MAT we've translated it to Dutch and German.
Then comes the translator along and asks about how to make changes to the English texts, which is my source texts and the basis of all translations. The source texts (English) are in a file Resources\values\Strings.xml. Alter a string there, would invalidate all translations (Dutch and German).
Besides invalidation, I can't send my translator the normal .xlf file, because all source texts are in the Strings.xml file.
So my question is, how can my translator alter the source language texts in the most easy way (preferably with an .xlf file)?
The short answer is that you can't. The design of the Multilingual App Toolkit focused on providing easy support for translation into other languages. The concept of providing source content editing was not considered.
That said, as a workaround you could add another variant of English. For Android apps, the default is English Neutral (en), so adding en-US or en-UK would create the XLIFF file that your translator / proofer could edit using the same tooling (e.g.: Multilingual Editor) to provide source content proofing. If using the same translator for proofing and translating, they could apply the translation based on the update English string to the Dutch and German files.
When you receive the XLF files back ensure all the resource in the proofing English XLF (e.g.: en-US) are marked as need review, translated or final (basically anything except 'New'). The reason is that the Multilingual App Toolkit does not include untranslated resource in the generated target resource file. (The reason is for language fallback purposes in Windows apps).
Now you can import the proofed English file with the other XLF file and build. Copy the entire contents from the proofed English resource file(s) overtop the original source files (recommend Comparing first). When you next build, you will receive warnings that the source resources have changed after the translation, but you can just review and clear those warning in the editor, or clear them globally within the Visual Studio IDE.

Testing Firefox Add-on/Extension Internationalization

I have created a Firefox Add-on using jpm and I have added a number of localization files such as:
locale/da.properties
locale/en-GB.properties
locale/en-US.properties
locale/fi.properties
And so on...
In my HTML files I use attributes to set these values, for example: data-l10n-id="ext_panel_heading_text".
I know the translations are working, because changes I make to values in en-GB.properties are reflected in my add-ons HTML page.
I've tried navigating to Options > Content > Choose... (under languages), removing English and adding another language (such as Finnish), however it doesn't seem to have an affect on the .properties file loaded by my extension. I also tried restarting Firefox after changing the language.
My question is: How do I test the different languages?
The language of Firefox is dependent on the activated language pack, or for Windows and Mac I believe it is hard coded into the build.
Language packs are available from https://addons.mozilla.org/en-US/firefox/language-tools/
The only way I know is to change general.useragent.locale to the locale you want to use (en-GB, da, en-US, fi) in about:configand then restarting your browser: that way your add-on should show localized texts.
As an alternative, you can use Quick Locale Switcher, which does the same but it's a little more friendly.

Default language doesn't work

I've added english language to my app written originally in polish, set the default language to en-us but for some reason people from non-english speaking countries still get the polish translation, any ideas?
You have to modify the project file manually:
<PropertyGroup>
<SupportedCultures>en;pl</SupportedCultures>
You don't have to add your default language to SupportedCultures

Spanish firefox showing wrong translation

Our Cake 1.3 php site is coded with English as the default language. On the front page we have a Spanish and Brazillian flag which is used to translate the site into the desired language via the use of .po files. When the flags are sued there is no problem with translations.
However we have found that when we use a Spanish version of Firefox to look directly at the site we see the brazilian text! I would have expected to see the English text or maybe even the browsers attempt to translate into Spanish.
Our Locale folder is structured as follows:
Locale
Por
LC_MESSAGES
default.po
Spa
LC_MESSAGES
default.po
Aprt from the obvious error of Spanish visitors to the site seeing Portugese this also leads to any sign ups that are done to be registered as an English sign up which is causing us a real head ache in the admin.
Is the Spanish firefox just picking the first translation file it sees? If so how do we stop this and either get it to use the correct version or, as I suspect it should be doing, show the english text thus making it obvious to press the Spanish flag.
Any help or advise would be appreciated.

Google Chrome extension internationalization, switch locale

I just implemented the internationalization (i18n) feature of google chrome in my extension. I have languages de and en. I named de as default in the manifest file:
"default_locale": "de"
No I want to test if en works but
"default_locale": "en"
has no effect on the language, it stays german. Any ideas?
It is still German because your browser locale is German. Internalization API has detailed instructions on how to switch your locale for testing (scroll to the middle of the page).

Resources