unable to override country code for i18n ui_locale testing

35 views
Skip to first unread message

se...@nextnowagency.com

unread,
Aug 20, 2017, 2:08:07 AM8/20/17
to Chromium-discuss
I have submitted this as an issue already, but just in case there's a known workaround,
  • I need to localization-test a chrome app which uses chrome.i18n.getMessage("@@ui_locale") to query the locale, and uses the locale in a variety of asset/content paths.
  • The client has called out over a dozen target languages by full country code; e.g. "fr_FR" and "fr_CA" need to be differentiable.
  • when I try, as directed, to launch chrome with e.g. "chrome.exe --lang=fr_FR --user-data-dir=c:\profile-test-fr_FR", chrome.i18n.getMessage("@@ui_locale") only returns the "fr" language code, not the full "fr_FR" locale (ditto for fr_CA and de_DE so far; only en_GB and en_US seem to return full locale codes)
  • when I try, as directed, to add languages via chrome://settings/languages, I CAN locate and add country-specific languages, but most of the ones I've tried end up with disabled "Display Google Chrome in this language" checkboxes.  The ones which ARE selectable, after I set them and relaunch chrome, still only return the language portion of the locale, not the country code.
  • the Quick Language Switcher chrome extension flat out does not work for testing extensions/apps, which all launch with whatever locale the current chrome instance/profile is natively set to.

Are there any other ways, preferably reliable and not requiring reinstalling or flipping the whole OS over to another locale, to specify chrome runtime locale including the country code?  Alternatively, is there some other key than @@ui_locale which I can query to guaranteed-return a viable country code?

I have tested the same app on a dedicated chromebox configured to other locales at the OS level, and in that case I do get the full code including country, but since the turnaround to deploy through the chrome store, even for an internal app, is 1-2 hours, and turnaround to wipe and reinitialize a manged chrome device can be the better part of an hour including tracking down all required accounts/images and re-downloading the app, that isn't really a viable path for iterative-testing over a dozen languages.

Currently running win10 x64 chrome 60.0.3112.101
Reply all
Reply to author
Forward
0 new messages