diff --git a/categories.xml b/categories.xml index b4f7f51..e17ec9e 100644 --- a/categories.xml +++ b/categories.xml @@ -1,4 +1,5 @@ - + + diff --git a/entries/Globalize.load.xml b/entries/Globalize.load.xml new file mode 100644 index 0000000..68a4933 --- /dev/null +++ b/entries/Globalize.load.xml @@ -0,0 +1,100 @@ + + + + Globalize.load() + + + A JSON object with CLDR data. + + + This method allows you to load CLDR JSON locale data. + +

+ This method can be called as many time as needed. All passed JSON objects are deeply merged internally. +

+
+ + Load CLDR data. + + + +
diff --git a/entries/Globalize.locale.xml b/entries/Globalize.locale.xml new file mode 100644 index 0000000..c281ab6 --- /dev/null +++ b/entries/Globalize.locale.xml @@ -0,0 +1,44 @@ + + + + Globalize.locale() + + + The locale string, eg: en, pt-BR, or zh-Hant-TW. + + + Set default locale, or get it if locale argument is omitted. + +

+ An application that supports globalization and/or localization will need to have a way to determine the user's preference. Attempting to automatically determine the appropriate locale is useful, but it is good practice to always offer the user a choice, by whatever means. +

+

+ Whatever your mechanism, it is likely that you will have to correlate the user's preferences with the list of locale data supported in the app. This method allows you to select the best match given the locale data that you have included and to set the Globalize locale to the one which the user prefers. +

+

+ LanguageMatching TBD (CLDR's spec http://www.unicode.org/reports/tr35/#LanguageMatching). +

+
+ + Prior to using this function, you must load cldr/supplemental/likelySubtags.json. Read CLDR content if you need more information. + { +// attributes: { +// "languageId": "pt", +// "maxLanguageId": "pt_Latn_BR", +// "language": "pt", +// "script": "Latn", +// "territory": "BR", +// "region": "BR" +// }, +// some more stuff... +// } +]]> + + +
diff --git a/pages/index.html b/pages/index.html new file mode 100644 index 0000000..c4c5366 --- /dev/null +++ b/pages/index.html @@ -0,0 +1,9 @@ + + +

Globalize is a JavaScript library for internationalization and localization that leverages the official Unicode CLDR JSON data.

+ +

To get started, use the search at the top of the page, view the + full listing of entries, or browse by + category from the sidebar.

\ No newline at end of file