Do we have a property that gives the current language of the user ?
What can I do to display a localized message or text in a dialog for a specific aircraft ?
hj.
var STRINGS = {
ENGLISH: {
hello: 'hello',
}, # end of english strings
FRENCH: {
hello: 'bonjour',
}, # end of french strings
SPANISH: {
hello: 'hola',
}, # end of spanish strings
};
var language = 'SPANISH';
print( STRINGS[language].hello );
Hooray wrote in Sat Aug 13, 2016 12:10 pm:Instead of settings the locale manually, you can refer to $FG_ROOT/Translations and the defaults used there to tell if another locale is in use, and then use for your heuristics.
So, no complicated changes are needed - however, if Erik is right, it would indeed make sense to expose the corresponding settings in the form of properties.
Hooray wrote in Sat Aug 20, 2016 9:26 pm:Anyway, as far as I remember, there should be some kind of /sim/intl and /locale tree somewhere in the global tree
Users browsing this forum: No registered users and 11 guests