strongloop / strong-globalize

strong-globalize is built on Unicode CLDR and jquery/globalize and implements automatic extraction of strings from JS source code and HTML templates, lint the string resource, machine-translate them in seconds. In runtime, it loads locale and string resource into memory and provides a hook to persistent logging.
Other
25 stars 16 forks source link

SG.SetDefaultLanguage only way to load CLDR #140

Open JohnLindahlTech opened 5 years ago

JohnLindahlTech commented 5 years ago

Given the following repo and specific row in my loopback-server I'm trying to get Strong-Globalize to work. https://github.com/JohnPhoto/sg-test/blob/master/server/server.js#L6

If I do not call SG.SetDefaultLanguage('sv'); row I am not able to get swedish to work. I interpret the call to set sv and then es as the fallback language, which is not what I exactly want to. But I am not able to find any documentation on how I am supposed to do anything differently.

My long haul plan is to use en as fallback language but adding support for request-based support for sv and es with negotiator, as briefly described here.

I am aware that this issue is more of a question rather than an issue, but maybe it can be seen as a request for some improvements in the documentation regarding usage and purpose of SG.SetDefaultLanguage().