Permalink
Browse files

Add Globalization Plugin.

  • Loading branch information...
1 parent 651283a commit cdf1e951b14a121fc9ebea0a51c1b085a4129000 @deedubbu deedubbu committed Sep 22, 2011
Showing with 2,610 additions and 0 deletions.
  1. +531 −0 BlackBerry/Globalization/Globalization.java
  2. +83 −0 BlackBerry/Globalization/GlobalizationError.java
  3. +20 −0 BlackBerry/Globalization/LICENSE
  4. +46 −0 BlackBerry/Globalization/README.md
  5. +86 −0 BlackBerry/Globalization/Resources.java
  6. +706 −0 BlackBerry/Globalization/Util.java
  7. +568 −0 BlackBerry/Globalization/globalization.js
  8. +570 −0 BlackBerry/Globalization/globalization.tests.js
  9. BIN BlackBerry/Globalization/resourceBundles/ar.js.gz
  10. BIN BlackBerry/Globalization/resourceBundles/ar_AE.js.gz
  11. BIN BlackBerry/Globalization/resourceBundles/ar_BH.js.gz
  12. BIN BlackBerry/Globalization/resourceBundles/ar_DZ.js.gz
  13. BIN BlackBerry/Globalization/resourceBundles/ar_EG.js.gz
  14. BIN BlackBerry/Globalization/resourceBundles/ar_IQ.js.gz
  15. BIN BlackBerry/Globalization/resourceBundles/ar_JO.js.gz
  16. BIN BlackBerry/Globalization/resourceBundles/ar_KW.js.gz
  17. BIN BlackBerry/Globalization/resourceBundles/ar_LB.js.gz
  18. BIN BlackBerry/Globalization/resourceBundles/ar_LY.js.gz
  19. BIN BlackBerry/Globalization/resourceBundles/ar_MA.js.gz
  20. BIN BlackBerry/Globalization/resourceBundles/ar_OM.js.gz
  21. BIN BlackBerry/Globalization/resourceBundles/ar_QA.js.gz
  22. BIN BlackBerry/Globalization/resourceBundles/ar_SA.js.gz
  23. BIN BlackBerry/Globalization/resourceBundles/ar_SD.js.gz
  24. BIN BlackBerry/Globalization/resourceBundles/ar_SY.js.gz
  25. BIN BlackBerry/Globalization/resourceBundles/ar_TN.js.gz
  26. BIN BlackBerry/Globalization/resourceBundles/ar_YE.js.gz
  27. BIN BlackBerry/Globalization/resourceBundles/be.js.gz
  28. BIN BlackBerry/Globalization/resourceBundles/be_BY.js.gz
  29. BIN BlackBerry/Globalization/resourceBundles/bg.js.gz
  30. BIN BlackBerry/Globalization/resourceBundles/bg_BG.js.gz
  31. BIN BlackBerry/Globalization/resourceBundles/bn_IN.js.gz
  32. BIN BlackBerry/Globalization/resourceBundles/ca.js.gz
  33. BIN BlackBerry/Globalization/resourceBundles/ca_ES.js.gz
  34. BIN BlackBerry/Globalization/resourceBundles/ca_ES_PREEURO.js.gz
  35. BIN BlackBerry/Globalization/resourceBundles/cs.js.gz
  36. BIN BlackBerry/Globalization/resourceBundles/cs_CZ.js.gz
  37. BIN BlackBerry/Globalization/resourceBundles/cs_CZ_EURO.js.gz
  38. BIN BlackBerry/Globalization/resourceBundles/cs_CZ_PREEURO.js.gz
  39. BIN BlackBerry/Globalization/resourceBundles/da.js.gz
  40. BIN BlackBerry/Globalization/resourceBundles/da_DK.js.gz
  41. BIN BlackBerry/Globalization/resourceBundles/da_DK_EURO.js.gz
  42. BIN BlackBerry/Globalization/resourceBundles/de.js.gz
  43. BIN BlackBerry/Globalization/resourceBundles/de_AT.js.gz
  44. BIN BlackBerry/Globalization/resourceBundles/de_AT_PREEURO.js.gz
  45. BIN BlackBerry/Globalization/resourceBundles/de_CH.js.gz
  46. BIN BlackBerry/Globalization/resourceBundles/de_DE.js.gz
  47. BIN BlackBerry/Globalization/resourceBundles/de_DE_PREEURO.js.gz
  48. BIN BlackBerry/Globalization/resourceBundles/de_LU.js.gz
  49. BIN BlackBerry/Globalization/resourceBundles/de_LU_PREEURO.js.gz
  50. BIN BlackBerry/Globalization/resourceBundles/el.js.gz
  51. BIN BlackBerry/Globalization/resourceBundles/el_CY.js.gz
  52. BIN BlackBerry/Globalization/resourceBundles/el_CY_EURO.js.gz
  53. BIN BlackBerry/Globalization/resourceBundles/el_CY_PREEURO.js.gz
  54. BIN BlackBerry/Globalization/resourceBundles/el_GR.js.gz
  55. BIN BlackBerry/Globalization/resourceBundles/el_GR_PREEURO.js.gz
  56. BIN BlackBerry/Globalization/resourceBundles/en.js.gz
  57. BIN BlackBerry/Globalization/resourceBundles/en_AU.js.gz
  58. BIN BlackBerry/Globalization/resourceBundles/en_BE.js.gz
  59. BIN BlackBerry/Globalization/resourceBundles/en_BE_PREEURO.js.gz
  60. BIN BlackBerry/Globalization/resourceBundles/en_CA.js.gz
  61. BIN BlackBerry/Globalization/resourceBundles/en_GB.js.gz
  62. BIN BlackBerry/Globalization/resourceBundles/en_GB_EURO.js.gz
  63. BIN BlackBerry/Globalization/resourceBundles/en_HK.js.gz
  64. BIN BlackBerry/Globalization/resourceBundles/en_IE.js.gz
  65. BIN BlackBerry/Globalization/resourceBundles/en_IE_PREEURO.js.gz
  66. BIN BlackBerry/Globalization/resourceBundles/en_IN.js.gz
  67. BIN BlackBerry/Globalization/resourceBundles/en_MT.js.gz
  68. BIN BlackBerry/Globalization/resourceBundles/en_NZ.js.gz
  69. BIN BlackBerry/Globalization/resourceBundles/en_PH.js.gz
  70. BIN BlackBerry/Globalization/resourceBundles/en_SG.js.gz
  71. BIN BlackBerry/Globalization/resourceBundles/en_US.js.gz
  72. BIN BlackBerry/Globalization/resourceBundles/en_ZA.js.gz
  73. BIN BlackBerry/Globalization/resourceBundles/es.js.gz
  74. BIN BlackBerry/Globalization/resourceBundles/es_AR.js.gz
  75. BIN BlackBerry/Globalization/resourceBundles/es_BO.js.gz
  76. BIN BlackBerry/Globalization/resourceBundles/es_CL.js.gz
  77. BIN BlackBerry/Globalization/resourceBundles/es_CO.js.gz
  78. BIN BlackBerry/Globalization/resourceBundles/es_CR.js.gz
  79. BIN BlackBerry/Globalization/resourceBundles/es_DO.js.gz
  80. BIN BlackBerry/Globalization/resourceBundles/es_EC.js.gz
  81. BIN BlackBerry/Globalization/resourceBundles/es_ES.js.gz
  82. BIN BlackBerry/Globalization/resourceBundles/es_ES_PREEURO.js.gz
  83. BIN BlackBerry/Globalization/resourceBundles/es_GT.js.gz
  84. BIN BlackBerry/Globalization/resourceBundles/es_HN.js.gz
  85. BIN BlackBerry/Globalization/resourceBundles/es_MX.js.gz
  86. BIN BlackBerry/Globalization/resourceBundles/es_NI.js.gz
  87. BIN BlackBerry/Globalization/resourceBundles/es_PA.js.gz
  88. BIN BlackBerry/Globalization/resourceBundles/es_PE.js.gz
  89. BIN BlackBerry/Globalization/resourceBundles/es_PR.js.gz
  90. BIN BlackBerry/Globalization/resourceBundles/es_PY.js.gz
  91. BIN BlackBerry/Globalization/resourceBundles/es_SV.js.gz
  92. BIN BlackBerry/Globalization/resourceBundles/es_US.js.gz
  93. BIN BlackBerry/Globalization/resourceBundles/es_UY.js.gz
  94. BIN BlackBerry/Globalization/resourceBundles/es_VE.js.gz
  95. BIN BlackBerry/Globalization/resourceBundles/et.js.gz
  96. BIN BlackBerry/Globalization/resourceBundles/et_EE.js.gz
  97. BIN BlackBerry/Globalization/resourceBundles/et_EE_EURO.js.gz
  98. BIN BlackBerry/Globalization/resourceBundles/et_EE_PREEURO.js.gz
  99. BIN BlackBerry/Globalization/resourceBundles/fi.js.gz
  100. BIN BlackBerry/Globalization/resourceBundles/fi_FI.js.gz
  101. BIN BlackBerry/Globalization/resourceBundles/fi_FI_PREEURO.js.gz
  102. BIN BlackBerry/Globalization/resourceBundles/fr.js.gz
  103. BIN BlackBerry/Globalization/resourceBundles/fr_BE.js.gz
  104. BIN BlackBerry/Globalization/resourceBundles/fr_BE_PREEURO.js.gz
  105. BIN BlackBerry/Globalization/resourceBundles/fr_CA.js.gz
  106. BIN BlackBerry/Globalization/resourceBundles/fr_CH.js.gz
  107. BIN BlackBerry/Globalization/resourceBundles/fr_FR.js.gz
  108. BIN BlackBerry/Globalization/resourceBundles/fr_FR_PREEURO.js.gz
  109. BIN BlackBerry/Globalization/resourceBundles/fr_LU.js.gz
  110. BIN BlackBerry/Globalization/resourceBundles/fr_LU_PREEURO.js.gz
  111. BIN BlackBerry/Globalization/resourceBundles/ga.js.gz
  112. BIN BlackBerry/Globalization/resourceBundles/ga_IE.js.gz
  113. BIN BlackBerry/Globalization/resourceBundles/gu.js.gz
  114. BIN BlackBerry/Globalization/resourceBundles/gu_IN.js.gz
  115. BIN BlackBerry/Globalization/resourceBundles/hi_IN.js.gz
  116. BIN BlackBerry/Globalization/resourceBundles/hr.js.gz
  117. BIN BlackBerry/Globalization/resourceBundles/hr_HR.js.gz
  118. BIN BlackBerry/Globalization/resourceBundles/hu.js.gz
  119. BIN BlackBerry/Globalization/resourceBundles/hu_HU.js.gz
  120. BIN BlackBerry/Globalization/resourceBundles/hu_HU_EURO.js.gz
  121. BIN BlackBerry/Globalization/resourceBundles/hu_HU_PREEURO.js.gz
  122. BIN BlackBerry/Globalization/resourceBundles/in.js.gz
  123. BIN BlackBerry/Globalization/resourceBundles/in_ID.js.gz
  124. BIN BlackBerry/Globalization/resourceBundles/is.js.gz
  125. BIN BlackBerry/Globalization/resourceBundles/is_IS.js.gz
  126. BIN BlackBerry/Globalization/resourceBundles/it.js.gz
  127. BIN BlackBerry/Globalization/resourceBundles/it_CH.js.gz
  128. BIN BlackBerry/Globalization/resourceBundles/it_IT.js.gz
  129. BIN BlackBerry/Globalization/resourceBundles/it_IT_PREEURO.js.gz
  130. BIN BlackBerry/Globalization/resourceBundles/iw.js.gz
  131. BIN BlackBerry/Globalization/resourceBundles/iw_IL.js.gz
  132. BIN BlackBerry/Globalization/resourceBundles/ja.js.gz
  133. BIN BlackBerry/Globalization/resourceBundles/ja_JP.js.gz
  134. BIN BlackBerry/Globalization/resourceBundles/ja_JP_JP.js.gz
  135. BIN BlackBerry/Globalization/resourceBundles/kk.js.gz
  136. BIN BlackBerry/Globalization/resourceBundles/kk_KZ.js.gz
  137. BIN BlackBerry/Globalization/resourceBundles/kn.js.gz
  138. BIN BlackBerry/Globalization/resourceBundles/kn_IN.js.gz
  139. BIN BlackBerry/Globalization/resourceBundles/ko.js.gz
  140. BIN BlackBerry/Globalization/resourceBundles/ko_KR.js.gz
  141. BIN BlackBerry/Globalization/resourceBundles/lt.js.gz
  142. BIN BlackBerry/Globalization/resourceBundles/lt_LT.js.gz
  143. BIN BlackBerry/Globalization/resourceBundles/lt_LT_EURO.js.gz
  144. BIN BlackBerry/Globalization/resourceBundles/lt_LT_PREEURO.js.gz
  145. BIN BlackBerry/Globalization/resourceBundles/lv.js.gz
  146. BIN BlackBerry/Globalization/resourceBundles/lv_LV.js.gz
  147. BIN BlackBerry/Globalization/resourceBundles/lv_LV_EURO.js.gz
  148. BIN BlackBerry/Globalization/resourceBundles/lv_LV_PREEURO.js.gz
  149. BIN BlackBerry/Globalization/resourceBundles/mk.js.gz
  150. BIN BlackBerry/Globalization/resourceBundles/mk_MK.js.gz
  151. BIN BlackBerry/Globalization/resourceBundles/ml_IN.js.gz
  152. BIN BlackBerry/Globalization/resourceBundles/mr.js.gz
  153. BIN BlackBerry/Globalization/resourceBundles/mr_IN.js.gz
  154. BIN BlackBerry/Globalization/resourceBundles/ms.js.gz
  155. BIN BlackBerry/Globalization/resourceBundles/ms_MY.js.gz
  156. BIN BlackBerry/Globalization/resourceBundles/mt.js.gz
  157. BIN BlackBerry/Globalization/resourceBundles/mt_MT.js.gz
  158. BIN BlackBerry/Globalization/resourceBundles/mt_MT_EURO.js.gz
  159. BIN BlackBerry/Globalization/resourceBundles/mt_MT_PREEURO.js.gz
  160. BIN BlackBerry/Globalization/resourceBundles/nb_NO.js.gz
  161. BIN BlackBerry/Globalization/resourceBundles/nl.js.gz
  162. BIN BlackBerry/Globalization/resourceBundles/nl_BE.js.gz
  163. BIN BlackBerry/Globalization/resourceBundles/nl_BE_PREEURO.js.gz
  164. BIN BlackBerry/Globalization/resourceBundles/nl_NL.js.gz
  165. BIN BlackBerry/Globalization/resourceBundles/nl_NL_PREEURO.js.gz
  166. BIN BlackBerry/Globalization/resourceBundles/no.js.gz
  167. BIN BlackBerry/Globalization/resourceBundles/no_NO.js.gz
  168. BIN BlackBerry/Globalization/resourceBundles/no_NO_NY.js.gz
  169. BIN BlackBerry/Globalization/resourceBundles/or_IN.js.gz
  170. BIN BlackBerry/Globalization/resourceBundles/pa.js.gz
  171. BIN BlackBerry/Globalization/resourceBundles/pa_IN.js.gz
  172. BIN BlackBerry/Globalization/resourceBundles/pl.js.gz
  173. BIN BlackBerry/Globalization/resourceBundles/pl_PL.js.gz
  174. BIN BlackBerry/Globalization/resourceBundles/pl_PL_EURO.js.gz
  175. BIN BlackBerry/Globalization/resourceBundles/pl_PL_PREEURO.js.gz
  176. BIN BlackBerry/Globalization/resourceBundles/pt.js.gz
  177. BIN BlackBerry/Globalization/resourceBundles/pt_BR.js.gz
  178. BIN BlackBerry/Globalization/resourceBundles/pt_PT.js.gz
  179. BIN BlackBerry/Globalization/resourceBundles/pt_PT_PREEURO.js.gz
  180. BIN BlackBerry/Globalization/resourceBundles/ro.js.gz
  181. BIN BlackBerry/Globalization/resourceBundles/ro_RO.js.gz
  182. BIN BlackBerry/Globalization/resourceBundles/ru.js.gz
  183. BIN BlackBerry/Globalization/resourceBundles/ru_RU.js.gz
  184. BIN BlackBerry/Globalization/resourceBundles/sh.js.gz
  185. BIN BlackBerry/Globalization/resourceBundles/sh_CS.js.gz
  186. BIN BlackBerry/Globalization/resourceBundles/sk.js.gz
  187. BIN BlackBerry/Globalization/resourceBundles/sk_SK.js.gz
  188. BIN BlackBerry/Globalization/resourceBundles/sk_SK_EURO.js.gz
  189. BIN BlackBerry/Globalization/resourceBundles/sk_SK_PREEURO.js.gz
  190. BIN BlackBerry/Globalization/resourceBundles/sl.js.gz
  191. BIN BlackBerry/Globalization/resourceBundles/sl_SI.js.gz
  192. BIN BlackBerry/Globalization/resourceBundles/sl_SI_PREEURO.js.gz
  193. BIN BlackBerry/Globalization/resourceBundles/sq.js.gz
  194. BIN BlackBerry/Globalization/resourceBundles/sq_AL.js.gz
  195. BIN BlackBerry/Globalization/resourceBundles/sr.js.gz
  196. BIN BlackBerry/Globalization/resourceBundles/sr_BA.js.gz
  197. BIN BlackBerry/Globalization/resourceBundles/sr_CS.js.gz
  198. BIN BlackBerry/Globalization/resourceBundles/sr_ME.js.gz
  199. BIN BlackBerry/Globalization/resourceBundles/sr_RS.js.gz
  200. BIN BlackBerry/Globalization/resourceBundles/sr_RS_Cyrl.js.gz
  201. BIN BlackBerry/Globalization/resourceBundles/sr_RS_Latn.js.gz
  202. BIN BlackBerry/Globalization/resourceBundles/sv.js.gz
  203. BIN BlackBerry/Globalization/resourceBundles/sv_SE.js.gz
  204. BIN BlackBerry/Globalization/resourceBundles/sv_SE_EURO.js.gz
  205. BIN BlackBerry/Globalization/resourceBundles/sv_SE_PREEURO.js.gz
  206. BIN BlackBerry/Globalization/resourceBundles/ta.js.gz
  207. BIN BlackBerry/Globalization/resourceBundles/ta_IN.js.gz
  208. BIN BlackBerry/Globalization/resourceBundles/te.js.gz
  209. BIN BlackBerry/Globalization/resourceBundles/te_IN.js.gz
  210. BIN BlackBerry/Globalization/resourceBundles/th.js.gz
  211. BIN BlackBerry/Globalization/resourceBundles/th_TH.js.gz
  212. BIN BlackBerry/Globalization/resourceBundles/th_TH_TH.js.gz
  213. BIN BlackBerry/Globalization/resourceBundles/tr.js.gz
  214. BIN BlackBerry/Globalization/resourceBundles/tr_TR.js.gz
  215. BIN BlackBerry/Globalization/resourceBundles/uk.js.gz
  216. BIN BlackBerry/Globalization/resourceBundles/uk_UA.js.gz
  217. BIN BlackBerry/Globalization/resourceBundles/vi.js.gz
  218. BIN BlackBerry/Globalization/resourceBundles/vi_VN.js.gz
  219. BIN BlackBerry/Globalization/resourceBundles/zh.js.gz
  220. BIN BlackBerry/Globalization/resourceBundles/zh_CN.js.gz
  221. BIN BlackBerry/Globalization/resourceBundles/zh_HK.js.gz
  222. BIN BlackBerry/Globalization/resourceBundles/zh_SG.js.gz
  223. BIN BlackBerry/Globalization/resourceBundles/zh_TW.js.gz

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,83 @@
+/*
+ * PhoneGap is available under *either* the terms of the modified BSD license *or* the
+ * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
+ *
+ * Copyright (c) 2011, IBM Corporation
+ */
+package com.phonegap.plugins.globalization;
+
+/**
+ * User initiated exception. Exception class representing defined
+ * Globalization error codes.
+ *
+ * Globalization error codes:
+ * GlobalizationError.UNKNOWN_ERROR = 0;
+ * GlobalizationError.FORMATTING_ERROR = 1;
+ * GlobalizationError.PARSING_ERROR = 2;
+ * GlobalizationError.PATTERN_ERROR = 3;
+ */
+public class GlobalizationError extends Exception {
+
+ private static final long serialVersionUID = 1L;
+ public static final String UNKNOWN_ERROR = "UNKNOWN_ERROR";
+ public static final String FORMATTING_ERROR = "FORMATTING_ERROR";
+ public static final String PARSING_ERROR = "PARSING_ERROR";
+ public static final String PATTERN_ERROR = "PATTERN_ERROR";
+
+ int error = 0; // default unknown error thrown
+
+ /**
+ * Default constructor
+ */
+ public GlobalizationError() {
+ }
+
+ /**
+ * Create an exception returning an error code
+ *
+ * @param s
+ */
+ public GlobalizationError(String s) {
+ if (s.equalsIgnoreCase(FORMATTING_ERROR)) {
+ error = 1;
+ } else if (s.equalsIgnoreCase(PARSING_ERROR)) {
+ error = 2;
+ } else if (s.equalsIgnoreCase(PATTERN_ERROR)) {
+ error = 3;
+ }
+ }
+
+ /**
+ * get error string based on error code
+ *
+ * @param String msg
+ */
+ public String getErrorString() {
+ String msg = "";
+ switch (error) {
+ case 0:
+ msg = UNKNOWN_ERROR;
+ break;
+ case 1:
+ msg = FORMATTING_ERROR;
+ break;
+ case 2:
+ msg = PARSING_ERROR;
+ break;
+ case 3:
+ msg = PATTERN_ERROR;
+ break;
+ }
+ return msg;
+ }
+
+ /**
+ * get error code
+ *
+ * @param String msg
+ */
+ public int getErrorCode() {
+ return error;
+ }
+
+}
@@ -0,0 +1,20 @@
+The MIT License
+
+Copyright (c) 2011 IBM
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ the Software, and to permit persons to whom the Software is furnished to do so,
+ subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,46 @@
+# PhoneGap Globalization Plugin #
+by IBM
+
+## Adding the Plugin to your project ##
+
+Using this plugin requires [BlackBerry-WebWorks PhoneGap](http://github.com/phonegap/phonegap-blackberry-webworks).
+
+1. To install the plugin, copy globalization.js to your project and include a reference to it in your html file after phonegap.js.
+
+ &lt;script type="text/javascript" charset="utf-8" src="phonegap.js"&gt;&lt;/script&gt;<br/>
+ &lt;script type="text/javascript" charset="utf-8" src="globalization.js"&gt;&lt;/script&gt;
+
+2. Copy the resourceBundles folder and all of its contents to your projects resources folder. The resourceBundles folder contains additional localization information that is not available from the BlackBerry operating system. If you do not need to support all the locales you may selectively remove them so they are not included in your application.
+
+3. Add the plugin source to your phonegap.jar in your projects ext folder. The phonegap.jar file is a jar of source code. Open phonegap.jar with your favorite archive manager or use the jar command to create a directory called "src/com/phonegap/plugins/globalization" and copy Globalization.java, GlobalizationError.java, Resources.java and Util.java into it.
+
+4. In your projects plugins.xml file add the following line:
+
+ &lt;plugin name="Globalization" value="com.phonegap.plugins.globalization.Globalization"/&gt;
+
+
+## RELEASE NOTES ##
+
+### 20110915 ###
+* Initial release
+* See the .js file for API docs
+* A globalization.tests.js file is provide to run with qunit as part of Mobile-Spec [Github](http://github.com/phonegap/mobile-spec)
+
+## BUGS AND CONTRIBUTIONS ##
+
+Patches welcome! Send a pull request. Requires a [CLA](https://files.pbworks.com/download/qH1OfztZ1d/phonegap/31724031/NitobiPhoneGapCLA.pdf).
+
+Post issues in the [PhoneGap Google Groups](http://groups.google.com/group/phonegap), include in the subject heading - "GlobalizationPlugin" or on [Github](http://github.com/phonegap/phonegap-plugins/issues)
+(preferred)
+
+## LICENSE ##
+
+The MIT License
+
+Copyright (c) 2011 IBM
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,86 @@
+/*
+ * PhoneGap is available under *either* the terms of the modified BSD license *or* the
+ * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
+ *
+ * Copyright (c) 2011, IBM Corporation
+ */
+package com.phonegap.plugins.globalization;
+
+public class Resources {
+ // Globalization Plugin Actions
+ public static final String GETLOCALENAME = "getLocaleName";
+ public static final String DATETOSTRING = "dateToString";
+ public static final String STRINGTODATE = "stringToDate";
+ public static final String GETDATEPATTERN = "getDatePattern";
+ public static final String GETDATENAMES = "getDateNames";
+ public static final String ISDAYLIGHTSAVINGSTIME = "isDayLightSavingsTime";
+ public static final String GETFIRSTDAYOFWEEK = "getFirstDayOfWeek";
+ public static final String NUMBERTOSTRING = "numberToString";
+ public static final String STRINGTONUMBER = "stringToNumber";
+ public static final String GETNUMBERPATTERN = "getNumberPattern";
+ public static final String GETCURRENCYPATTERN = "getCurrencyPattern";
+
+ // Globalization Option Parameters
+ public static final String OPTIONS = "options";
+ public static final String FORMATLENGTH = "formatLength";
+ public static final String MEDIUM = "medium";
+ public static final String LONG = "long";
+ public static final String FULL = "full";
+ public static final String SELECTOR = "selector";
+ public static final String DATE = "date";
+ public static final String TIME = "time";
+ public static final String DATESTRING = "dateString";
+ public static final String TYPE = "type";
+ public static final String ITEM = "item";
+ public static final String NARROW = "narrow";
+ public static final String WIDE = "wide";
+ public static final String MONTHS = "months";
+ public static final String DAYS = "days";
+ public static final String SPACE = " ";
+ public static final String DATEDELIMITER = "-";
+ public static final String TIMEDELIMITER = ":";
+ public static final String[] AM_PMFORMATS = {"a","aa"};
+ public static final String NUMBER = "number";
+ public static final String NUMBERSTRING = "numberString";
+ public static final String PERCENT = "percent";
+ public static final String CURRENCY = "currency";
+ public static final String CURRENCYCODE = "currencyCode";
+
+ // JSON File: JSONObject
+ public static final String JSON_CURRENCY = "currency";
+ public static final String JSON_LOCALE = "locale";
+ public static final String JSON_NAME = "name";
+
+ // JSON File: parameters
+ // locale:
+ public static final String JSON_PATTERN = "pattern";
+ public static final String JSON_DECIMAL = "decimal";
+ public static final String JSON_FRACTION = "fraction";
+ public static final String JSON_ROUNDING = "rounding";
+ public static final String JSON_GROUPING = "grouping";
+ public static final String JSON_NEGATIVE = "negative";
+ public static final String JSON_FIRISTDAYOFWEEK = "firstDayOfWeek";
+ public static final String JSON_POSITIVE = "positive";
+ public static final String JSON_PERCENTSYMBOL = "percentSymbol";
+ public static final String JSON_CURRENCYSYMBOL = "currencySymbol";
+ public static final String JSON_DECIMALSYMBOL = "decimalSymbol";
+ public static final String JSON_DISPLAYNAME = "displayName";
+
+ // currency
+ public static final String JSON_CURRENCYCODE = "currencyCode";
+ public static final String JSON_CURRENCYPATTERN = "currencyPattern";
+ public static final String JSON_CURRENCYDECIMAL = "currencyDecimal";
+ public static final String JSON_CURRENCYFRACTION = "currencyFraction";
+ public static final String JSON_CURRENCYGROUPING = "currencyGrouping";
+ public static final String JSON_CURRENCYROUNDING = "currencyRounding";
+
+ // class paths:
+ public static final String LOCALEINFOPATH = "/resources/resourceBundles/";
+ public static final String LOCALEINFOPATHEND = ".js.gz";
+
+ // locale resource key identifiers
+ public static final int LOCALENAME = 0;
+
+ // Persistent Store ID:
+ public static final long PERSISTENTSTORE_ID = 0x10001;
+}
Oops, something went wrong.

0 comments on commit cdf1e95

Please sign in to comment.