
Extends Locale.Set (the class which Locale sets are an instance of) with a function to create locale sets from a JSON string. This locale set can then be used through Locale.use to set as current locale.
Returns a Locale.Set containing the language items described in the JSON string.
Language.Set.from(str);
var json = '{"name":"en-US","sets":{"FormValidator":{"required":"This field is required."}}}'; var mySet = Locale.Set.from(json); Locale.use(mySet); // mySet is now the current locale
© Linux.ria.ua, 2008-2024 |