Set locale to "de-CH"

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Set locale to "de-CH"

Postby Iligor » Wed Oct 16, 2019 3:22 am

Hello,

I am trying to set the locale of CEF to "de-CH" (by setting both, locale and accepted-language parameters), but
Code: Select all
navigator.language
will always show "de-DE". I can configure Google Chrome to display "de-CH" by installing the language and setting it as the default language using the settings tab. Is there a similar feature in CEF to "install" the "de-CH" locale?

Thank you!
Iligor
Newbie
 
Posts: 2
Joined: Wed Oct 16, 2019 3:16 am

Re: Set locale to "de-CH"

Postby magreenblatt » Wed Oct 16, 2019 4:18 am

There does not appear to be a locales pak file for de-CH specifically. You can run with the `--lang=de` command-line flag on Windows/macOS or set the appropriate LANG/LC_* environment variables on Linux. You can also configure CefSettings.locale or CefSettings.accept_language_list. See documentation on those values.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Set locale to "de-CH"

Postby Iligor » Wed Oct 16, 2019 4:58 am

The major problem I have with using something like `--lang=de` is that numbers are formatted differently in de-DE and de-CH. I have set the CefSettings.locale and CefSettings.accept_language_list and the language settings of my operating system (Windows) to de-CH, but the number one thousand is displayed as "1.000" instead of "1'000" in CEF.
Iligor
Newbie
 
Posts: 2
Joined: Wed Oct 16, 2019 3:16 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 196 guests