Moderator:Forum Administrators
Lowena wrote:Yeah, a lot of features on this site are broken and have been for years.
Code: Select all
// get locale code (i.e. 'en')
var currentLocale = Locale.get();
// set fallback locale
Locale.setDefault('de');
// set a message
Locale.setMessage(
'welcome',
{
de: 'Willkommen!',
en: 'Welcome!',
no: 'Velkommen!'
}
);
// print the hello message with current language
var greeting = Locale.getMessage('welcome');
window.alert(greeting);
Return to “Unilang - Information, Input, and Questions”
Users browsing this forum: No registered users and 19 guests