The default en-US locale pak file fails to load on Mac

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.

The default en-US locale pak file fails to load on Mac

Postby Czarek » Wed Jan 14, 2015 3:22 am

There are errors: "locale.file_path empty" and "Locale could not be found for en-US". I've set the resources_dir_path setting and it can find other resources just fine. I don't see the "Resources/en-US.lproj/" directory, but it seems to be working fine in cefclient. Where is the en-US locale pak file on Mac? On Windows I can see "en-US.pak" in the locales/ directory.

I am wondering if this error has something to do with the fact that I'm not using the directory structure like the one in cefclient.app. I've put all libraries/executables and the Resources/ directory in a single directory to make it simple, so that it is consistent with how it's done on Windows and Linux and to avoid possible issues with app packagers like pyinstaller.

I've fixed this error by setting the --locale_pak=Resources/en.lproj/locale.pak file. But now after looking at the CEF sources I see that I could've just done it by setting the --lang=en flag. It works, but I would to be nice to know why it fails to set the en-US locale.

Using CEF 3 branch 1650 revision 1639.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: The default en-US locale pak file fails to load on Mac

Postby magreenblatt » Wed Jan 14, 2015 10:38 am

Chromium code makes assumptions about the app bundle structure to find locale files. If you don't have the expected structure then it fails.
magreenblatt
Site Admin
 
Posts: 12406
Joined: Fri May 29, 2009 6:57 pm

Re: The default en-US locale pak file fails to load on Mac

Postby Czarek » Wed Jan 14, 2015 12:47 pm

Okay thanks for explaining. So nothing can be done, I will just use the CefSettings.locale option and set it to "en" by default on Mac.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am


Return to Support Forum

Who is online

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