Google Chrome extension internationalization, switch locale - internationalization

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).

Related

Change Google colab language setting

How to change Colab interface from French to English? I can not find this setting. this is my problem. The interface:
I think that in section "Aide" the last option should be "Voir en anglais"
Select Aide > Afficher en anglais.
Goodluck!
The language presented is based on browser settings, so you'll want to change the language settings in your browser.
Instructions for Chrome are here:
https://www.wikihow.com/Change-the-Default-Language-in-Google-Chrome
hl parameter is used to set the page language. Add ?hl=en at the end of the URL of the page.

base internationalization in 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

Interface Translation and Internationalization in XUL

I need to translate an application XUL by two versions English and French. Now all strings in interface on French. What are the tools and Libraries with I can translate the file .XUL or have you an others solutions?
XUL overlays add-ons usually localize with DTD or .properties files or both.
The old-but-still-accurate XUL Tutorial and the XUL School tutorial (add-ons) have some examples and descriptions.
Basically it boils down to:
Declaring one or more locales in your chrome.manifest. The browser will then make available the most appropriate locale automatically by the same URI prefix.
Using DTD in XUL (overlays, windows, dialogs).
Using stringbundles (aka. .properties) for everything else (or even instead of DTDs even for XUL).
Example
So for example you might have the following chrome.manifest declarations:
locale my-addon en-US locale/en-US/
locale my-addon en-GB locale/en-GB/
locale my-addon fr-FR locale/fr-FR/
You'd then add some.dtd to all locales (locale directories):
locale/en-US/some.dtd
<!ENTITY some.label "Hi">
locale/en-GB/some.dtd
<!ENTITY some.label "Hello">
locale/fr-FR/some.dtd
<!ENTITY some.label "Bonjour">
You can then access some.dtd by chrome://my-addon/locale/some.dtd and the application will automatically select whatever locale best corresponds to the browser and user preferences, e.g.
<?xml version="1.0"?>
<!DOCTYPE overlay SYSTEM "chrome://my-addon/locale/some.dtd">
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<popup id="contentAreaContextMenu">
<menuitem label="&some.label;"/>
</popup>
</overlay>
Of course, this does not only work with .dtd, but with .properties and any other file. You can e.g. add a flag.png to all locales, and have the en-GB locale be the Star-Spangled Banner, the en-GB locale be the Union Jack, while having the fr-FR be Le Tricolore.
I demonstrated all of the above in a full-blown example add-on.
Add-on SDK
The Add-on SDK uses a similar but different localization system.
Testing
ProTip: You can test your add-on locales by changing the value of general.useragent.locale via about:config and restarting the browser. (There are also add-ons that to this for you). This will even work if the browser is e.g. only English and you switch to e.g. French fr-FR/fr. Then only the add-ons (incl. your add-on ;) that have a French locale will display french strings while the others will fall back to en-US or whatever they support.

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.

Emulator does not display localised simplified chinese text in windows phone

Although I have created a resource file for simplified chinese AppResources.zh-CH.resx, and i have added it in the supported culture in the csproj, the chinese text is not displayed. Instead the default english text is shown when i change the language to simplified chinese.
Though those text such as the month name which is obtained from the WP OS is shown in chinese.
The other languages such as spanish and german works like a charm. I have created the generic german and spanish( AppResources.de.resx, and AppResources.es.resx)
Am i missing? Do i have to make changes for any other changes for chinese?
Your entering the wrong (unsupported) culture for in the supported culture.
Please check the following link for the supported language and culture.

Resources