1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 package com.sun.star.wizards.letter; 24 25 import com.sun.star.lang.XMultiServiceFactory; 26 import com.sun.star.wizards.common.Resource; 27 import com.sun.star.beans.PropertyValue; 28 29 public class LocaleCodes extends Resource 30 { 31 32 final static String UNIT_NAME = "svtres"; 33 final static String MODULE_NAME = "svt"; 34 PropertyValue[] allLanguageStrings; 35 LocaleCodes(XMultiServiceFactory xmsf)36 public LocaleCodes(XMultiServiceFactory xmsf) 37 { 38 super(xmsf, UNIT_NAME, MODULE_NAME); 39 allLanguageStrings = getStringList(16638); // STR_ARR_SVT_LANGUAGE_TABLE from svtools/source/misc/langtab.src 40 } 41 getLanguageString(String MSID)42 public String getLanguageString(String MSID) 43 { 44 String LS = "unknown Language"; 45 for (int i = 0; i < allLanguageStrings.length; i++) 46 { 47 if (allLanguageStrings[i].Value.toString().equalsIgnoreCase(MSID)) 48 { 49 LS = allLanguageStrings[i].Name; 50 } 51 } 52 return LS; 53 } 54 getIDs()55 public String[] getIDs() 56 { 57 String[] Ids = new String[135]; 58 59 Ids[0] = "Afrikaans;af;1078"; 60 Ids[1] = "Albanian;sq;1052"; 61 Ids[2] = "Arabic - United Arab Emirates;ar-ae;14337"; 62 Ids[3] = "Arabic - Bahrain;ar-bh;15361"; 63 Ids[4] = "Arabic - Algeria;ar-dz;5121"; 64 Ids[5] = "Arabic - Egypt;ar-eg;3073"; 65 Ids[6] = "Arabic - Iraq;ar-iq;2049"; 66 Ids[7] = "Arabic - Jordan;ar-jo;11265"; 67 Ids[8] = "Arabic - Kuwait;ar-kw;13313"; 68 Ids[9] = "Arabic - Lebanon;ar-lb;12289"; 69 Ids[10] = "Arabic - Libya;ar-ly;4097"; 70 Ids[11] = "Arabic - Morocco;ar-ma;6145"; 71 Ids[12] = "Arabic - Oman;ar-om;8193"; 72 Ids[13] = "Arabic - Qatar;ar-qa;16385"; 73 Ids[14] = "Arabic - Saudi Arabia;ar-sa;1025"; 74 Ids[15] = "Arabic - Syria;ar-sy;10241"; 75 Ids[16] = "Arabic - Tunisia;ar-tn;7169"; 76 Ids[17] = "Arabic - Yemen;ar-ye;9217"; 77 Ids[18] = "Armenian;hy;1067"; 78 Ids[19] = "Azeri - Latin;az-az;1068"; 79 Ids[20] = "Azeri - Cyrillic;az-az;2092"; 80 Ids[21] = "Basque;eu;1069"; 81 Ids[22] = "Belarusian;be;1059"; 82 Ids[23] = "Bulgarian;bg;1026"; 83 Ids[24] = "Catalan;ca;1027"; 84 Ids[25] = "Chinese - China;zh-cn;2052"; 85 Ids[26] = "Chinese - Hong Kong SAR;zh-hk;3076"; 86 Ids[27] = "Chinese - Macau SAR;zh-mo;5124"; 87 Ids[28] = "Chinese - Singapore;zh-sg;4100"; 88 Ids[29] = "Chinese - Taiwan;zh-tw;1028"; 89 Ids[30] = "Croatian;hr;1050"; 90 Ids[31] = "Czech;cs;1029"; 91 Ids[32] = "Danish;da;1030"; 92 Ids[33] = "Dutch - The Netherlands;nl-nl;1043"; 93 Ids[34] = "Dutch - Belgium;nl-be;2067"; 94 Ids[35] = "English - Australia;en-au;3081"; 95 Ids[36] = "English - Belize;en-bz;10249"; 96 Ids[37] = "English - Canada;en-ca;4105"; 97 Ids[38] = "English - Caribbean;en-cb;9225"; 98 Ids[39] = "English - Ireland;en-ie;6153"; 99 Ids[40] = "English - Jamaica;en-jm;8201"; 100 Ids[41] = "English - New Zealand;en-nz;5129"; 101 Ids[42] = "English - Phillippines;en-ph;13321"; 102 Ids[43] = "English - South Africa;en-za;7177"; 103 Ids[44] = "English - Trinidad;en-tt;11273"; 104 Ids[45] = "English - United Kingdom;en-gb;2057"; 105 Ids[46] = "English - United States;en-us;1033"; 106 Ids[47] = "Estonian;et;1061"; 107 Ids[48] = "Persian;fa;1065"; 108 Ids[49] = "Finnish;fi;1035"; 109 Ids[50] = "Faroese;fo;1080"; 110 Ids[51] = "French - France;fr-fr;1036"; 111 Ids[52] = "French - Belgium;fr-be;2060"; 112 Ids[53] = "French - Canada;fr-ca;3084"; 113 Ids[54] = "French - Luxembourg;fr-lu;5132"; 114 Ids[55] = "French - Switzerland;fr-ch;4108"; 115 Ids[56] = "Gaelic - Ireland;gd-ie;2108"; 116 Ids[57] = "Gaelic - Scotland;gd;1084"; 117 Ids[58] = "German - Germany;de-de;1031"; 118 Ids[59] = "German - Austria;de-at;3079"; 119 Ids[60] = "German - Liechtenstein;de-li;5127"; 120 Ids[61] = "German - Luxembourg;de-lu;4103"; 121 Ids[62] = "German - Switzerland;de-ch;2055"; 122 Ids[63] = "Greek;el;1032"; 123 Ids[64] = "Hebrew;he;1037"; 124 Ids[65] = "Hindi;hi;1081"; 125 Ids[66] = "Hungarian;hu;1038"; 126 Ids[67] = "Icelandic;is;1039"; 127 Ids[68] = "Indonesian;id;1057"; 128 Ids[69] = "Italian - Italy;it-it;1040"; 129 Ids[70] = "Italian - Switzerland;it-ch;2064"; 130 Ids[71] = "Japanese;ja;1041"; 131 Ids[72] = "Korean;ko;1042"; 132 Ids[73] = "Latvian;lv;1062"; 133 Ids[74] = "Lithuanian;lt;1063"; 134 Ids[75] = "FYRO Macedonian;mk;1071"; 135 Ids[76] = "Malay - Malaysia;ms-my;1086"; 136 Ids[77] = "Malay - Brunei;ms-bn;2110"; 137 Ids[78] = "Maltese;mt;1082"; 138 Ids[79] = "Marathi;mr;1102"; 139 Ids[80] = "Norwegian - Bokm?l;no-no;1044"; 140 Ids[81] = "Norwegian - Nynorsk;no-no;2068"; 141 Ids[82] = "Polish;pl;1045"; 142 Ids[83] = "Portuguese - Portugal;pt-pt;2070"; 143 Ids[84] = "Portuguese - Brazil;pt-br;1046"; 144 Ids[85] = "Raeto-Romance;rm;1047"; 145 Ids[86] = "Romanian - Romania;ro;1048"; 146 Ids[87] = "Romanian - Moldova;ro-mo;2072"; 147 Ids[88] = "Russian;ru;1049"; 148 Ids[89] = "Russian - Moldova;ru-mo;2073"; 149 Ids[90] = "Sanskrit;sa;1103"; 150 Ids[91] = "Serbian - Cyrillic;sr-sp;3098"; 151 Ids[92] = "Serbian - Latin;sr-sp;2074"; 152 Ids[93] = "Setsuana;tn;1074"; 153 Ids[94] = "Slovenian;sl;1060"; 154 Ids[95] = "Slovak;sk;1051"; 155 Ids[96] = "Sorbian;sb;1070"; 156 Ids[97] = "Spanish - Spain;es-es;1034"; 157 Ids[98] = "Spanish - Argentina;es-ar;11274"; 158 Ids[99] = "Spanish - Bolivia;es-bo;16394"; 159 Ids[100] = "Spanish - Chile;es-cl;13322"; 160 Ids[101] = "Spanish - Colombia;es-co;9226"; 161 Ids[102] = "Spanish - Costa Rica;es-cr;5130"; 162 Ids[103] = "Spanish - Dominican Republic;es-do;7178"; 163 Ids[104] = "Spanish - Ecuador;es-ec;12298"; 164 Ids[105] = "Spanish - Guatemala;es-gt;4106"; 165 Ids[106] = "Spanish - Honduras;es-hn;18442"; 166 Ids[107] = "Spanish - Mexico;es-mx;2058"; 167 Ids[108] = "Spanish - Nicaragua;es-ni;19466"; 168 Ids[109] = "Spanish - Panama;es-pa;6154"; 169 Ids[110] = "Spanish - Peru;es-pe;10250"; 170 Ids[111] = "Spanish - Puerto Rico;es-pr;20490"; 171 Ids[112] = "Spanish - Paraguay;es-py;15370"; 172 Ids[113] = "Spanish - El Salvador;es-sv;17418"; 173 Ids[114] = "Spanish - Uruguay;es-uy;14346"; 174 Ids[115] = "Spanish - Venezuela;es-ve;8202"; 175 Ids[116] = "Sutu;sx;1072"; 176 Ids[117] = "Swahili;sw;1089"; 177 Ids[118] = "Swedish - Sweden;sv-se;1053"; 178 Ids[119] = "Swedish - Finland;sv-fi;2077"; 179 Ids[120] = "Tamil;ta;1097"; 180 Ids[121] = "Tatar;tt;1092"; 181 Ids[122] = "Thai;th;1054"; 182 Ids[123] = "Turkish;tr;1055"; 183 Ids[124] = "Tsonga;ts;1073"; 184 Ids[125] = "Ukrainian;uk;1058"; 185 Ids[126] = "Urdu;ur;1056"; 186 Ids[127] = "Uzbek - Cyrillic;uz-uz;2115"; 187 Ids[128] = "Uzbek - Latin;uz-uz;1091"; 188 Ids[129] = "Vietnamese;vi;1066"; 189 Ids[130] = "Xhosa;xh;1076"; 190 Ids[131] = "Yiddish;yi;1085"; 191 Ids[132] = "Zulu;zu;1077"; 192 Ids[133] = "Khmer;km-kh;1107"; 193 Ids[134] = "Burmese;my-mm;1109"; 194 195 return Ids; 196 } 197 } 198