From 7a9b6a77344716f2a3139c3a70308c9aee4d8e7d Mon Sep 17 00:00:00 2001 From: "Raphael H. Amorim" Date: Sun, 6 Sep 2015 02:57:00 -0300 Subject: [PATCH 1/5] added page about API Documentation --- pages/index.html | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 pages/index.html 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 From 345d42df39ba1a2f43f36117ea83c508dc80ec10 Mon Sep 17 00:00:00 2001 From: Raphael Amorim Date: Wed, 9 Sep 2015 18:18:11 -0300 Subject: [PATCH 2/5] added entries (Globalize.load) --- entries/Globalize.load.xml | 100 +++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 entries/Globalize.load.xml 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. + + + +
From 329f2b9ea7626e4d68ed4b6aa59025cb24b36837 Mon Sep 17 00:00:00 2001 From: Raphael Amorim Date: Wed, 9 Sep 2015 18:18:57 -0300 Subject: [PATCH 3/5] add config in categories --- categories.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/categories.xml b/categories.xml index b4f7f51..e17ec9e 100644 --- a/categories.xml +++ b/categories.xml @@ -1,4 +1,5 @@ - + + From ae67364254f442cfd58d37b9010223b874f33318 Mon Sep 17 00:00:00 2001 From: Raphael Amorim Date: Wed, 9 Sep 2015 18:29:35 -0300 Subject: [PATCH 4/5] added Globalize.locale docs --- entries/Globalize.locale.xml | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 entries/Globalize.locale.xml diff --git a/entries/Globalize.locale.xml b/entries/Globalize.locale.xml new file mode 100644 index 0000000..16bb679 --- /dev/null +++ b/entries/Globalize.locale.xml @@ -0,0 +1,44 @@ + + + + Globalize.load() + + + 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... +// } +]]> + + +
From dc33945672dd7457a67ce3ce0f4795b520521622 Mon Sep 17 00:00:00 2001 From: Raphael Amorim Date: Wed, 9 Sep 2015 18:36:17 -0300 Subject: [PATCH 5/5] adjust wrong name --- entries/Globalize.locale.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entries/Globalize.locale.xml b/entries/Globalize.locale.xml index 16bb679..c281ab6 100644 --- a/entries/Globalize.locale.xml +++ b/entries/Globalize.locale.xml @@ -1,7 +1,7 @@ - - Globalize.load() + + Globalize.locale() The locale string, eg: en, pt-BR, or zh-Hant-TW.