Difference between revisions of "Scalix 11.4.1 Localization How-To"

From Scalix Wiki
Jump to: navigation, search
 
Line 1: Line 1:
== How to: package a new language for installation on a server: == <br>
+
== How to: package a new language for installation on a server: ==
  
 
'''How-to purpose: how to add a language in SWA from Tools/Options/General/Language'''
 
'''How-to purpose: how to add a language in SWA from Tools/Options/General/Language'''
Line 5: Line 5:
 
'''Note : xx_YY where xx is the abbreviation for a language an YY is the abbreviation for a country '''(see the Appendix at the end of the document)''''''
 
'''Note : xx_YY where xx is the abbreviation for a language an YY is the abbreviation for a country '''(see the Appendix at the end of the document)''''''
  
In your target: Red hat <br>
+
In your target: Red Hat <br>
  
# Download the localization kit which is available at bilbo.us.scalix.com/share/release/nightly/XX/CURRENT/ent-redhat-intel/scalix-.../extras/swa/localization-kit/swa-localization-kit-xxx.tar.gz <br>
+
# As of 11.4.1 the localization kit is packaged with the server. You can find it in the extras directory.
 
# Extract it to the desktop. This creates a directory "swa-localization-kit-11.4.1-11567" <br>
 
# Extract it to the desktop. This creates a directory "swa-localization-kit-11.4.1-11567" <br>
 
     >tar -xvvzf filename
 
     >tar -xvvzf filename

Revision as of 17:09, 28 August 2008

How to: package a new language for installation on a server:

How-to purpose: how to add a language in SWA from Tools/Options/General/Language

'Note : xx_YY where xx is the abbreviation for a language an YY is the abbreviation for a country (see the Appendix at the end of the document)'

In your target: Red Hat

  1. As of 11.4.1 the localization kit is packaged with the server. You can find it in the extras directory.
  2. Extract it to the desktop. This creates a directory "swa-localization-kit-11.4.1-11567"
    >tar -xvvzf filename

1. Make your language folder

    >cd /swa-localization-kit-11.4.1-11567/src and Create a folder named xx_YY 

2. Copy an existing strings.xml file in your new language folder

    >cp ../samples/en/strings.xml  xx_YY/  

3. Use vi to edit this strings.xml file. This is the file where you will change the strings to your language. Open it with an editor and you will see that the strings are under the form <string id="xxxx>YYY</string>. You have the change the YYY part everywhere.

    >vi xx_YY/strings.xml

4. Create a folder named dict and a folder named phonet in your language folder
5. Install the most recent gcc-c++ libraries

    >use package manager to install gcc-c++

6. Download aspell from http://aspell.net
7. Extract aspell

    >tar -xvvzf filename

8. Install aspell

    >cd aspell-.../
    >./configure && make
    >make install

9. Download an aspell dictionary from [1]
10. Extract the aspell dictionary

    >tar xvfj aspel-....

11. Install the aspell dictionary

    >./configure
    >make
    >make install

8. To get a word list for the language, change Red Hat to this language. Then type:

    Click on system/administration/language and change language
    Log out and log int
    >aspell dump master > wordlist.txt 

9. Then rename the file to dict_xx_YY.txt and move the file to /swa-loca.../src/xx_YY/dict
10. Now in your aspell language directory find a file with phonet in its name. Rename it to phonet_xx_YY.txt and place it in /swa-loca.../src/xx_YY/phonet
11. Go back to the root of the localization kit

    >cd Desktop/swa-localization-kit-11.4.1-11472 

12. Make the language package

    >./package-locale.sh xx_YY 

13. Place the package on the server and install it

    >rpm -ivh package_name 

14. Finally, you must restart scalix tomcat server

    >/etc/init.d/scalix-tomcat restart

Appendix

Language abbreviation list:

Afrikaans = af
Albanian = sq
Arabic (Algeria) = ar-dz
Arabic (Bahrain) = ar-bh
Arabic (Egypt) = ar-eg
Arabic (Iraq) = ar-iq
Arabic (Jordan) = ar-jo
Arabic (Kuwait) = ar-kw
Arabic (Lebanon) = ar-lb
Arabic (libya) = ar-ly
Arabic (Morocco) = ar-ma
Arabic (Oman) = ar-om
Arabic (Qatar) = ar-qa
Arabic (Saudi Arabia) = ar-sa
Arabic (Syria) = ar-sy
Arabic (Tunisia) = ar-tn
Arabic (U.A.E.) = ar-ae
Arabic (Yemen) = ar-ye
Arabic = ar
Armenian = hy
Assamese = as
Azeri (Cyrillic) = az
Azeri (Latin) = az
Basque = eu
Belarusian = be
Bengali = bn
Bulgarian = bg
Catalan = ca
Chinese (China) = zh-cn
Chinese (Hong Kong SAR) = zh-hk
Chinese (Macau SAR) = zh-mo
Chinese (Singapore) = zh-sg
Chinese (Taiwan) = zh-tw
Chinese = zh
Croatian = hr
Chech = cs
Danish = da
Divehi = div
Dutch (Belgium) = nl-be
Dutch (Netherlands) = nl
English (Australia) = en-au
English (Belize) = en-bz
English (Canada) = en-ca
English (Caribbean) = en
English (Ireland) = en-ie
English (Jamaica) = en-jm
English (New Zealand) = en-nz
English (Philippines) = en-ph
English (South Africa) = en-za
English (Trinidad) = en-tt
English (United Kingdom) = en-gb
English (United States) = en-us
English (Zimbabwe) = en-zw
English = en
Estonian = et
Faeroese = fo
Farsi = fa
Finnish = fi
French (Belgium) = fr-be
French (Canada) = fr-ca
French (France) = fr
French (Luxembourg) = fr-lu
French (Monaco) = fr-mc
French (Switzerland) = fr-ch
FYRO Macedonian = mk
Gaelic = gd
Georgian = ka
German (Austria) = de-at
German (Germany) = de
German (Liechtenstein) = de-li
German (lexumbourg) = de-lu
German (Switzerland) = de-ch
Greek = el
Gujarati = gu
Hebrew = he
Hindi = hi
Hungarian = hu
Icelandic = is
Indonesian = id
Italian (Italy) = it
Italian (Switzerland) = it-ch
Japanese = ja
Kannada = kn
Kazakh = kk
Konkani = kok
Korean = ko
Kyrgyz = kz
Latvian = lv
Lithuanian = lt
Malay (Brunei) = ms
Malay (Malaysia) = ms
Malayalam = ml
Maltese = mt
Marathi = mr
Mongolian (Cyrillic) = mn
Nepali (India) = ne
Norwegian (Bokmal) = nb-no
Norwegian (Bokmal) = no
Norwegian (Nynorsk) = nn-no
Oriya = or
Polish = pl
Portuguese (Brazil) = pt-br
Portuguese (Portugal) = pt
Punjabi = pa
Rhaeto-Romanic = rm
Romanian (Moldova) = ro-md
Romanian = ro
Russian (Moldova) = ru-md
Russian = ru
Sanskrit = sa
Serbian (Cyrillic) = sr
Serbian (Latin) = sr
Slovak = sk
Slovenian = ls
Sorbian = sb
Spanish (Argentina) = es-ar
Spanish (Bolivia) = es-bo
Spanish (Chile) = es-cl
Spanish (Colombia) = es-co
Spanish (Costa Rica) = es-cr
Spanish (Dominican Republic) = es-do
Spanish (Ecuador) = es-ec
Spanish (El Salvador) = es-sv
Spanish (Guatemala) = es-gt
Spanish (Honduras) = es-hn
Spanish (International Sort) = es
Spanish (Mexico) = es-mx
Spanish (Nicaragua) = es-ni
Spanish (Panama) = es-pa
Spanish (Paraguay) = es-py
Spanish (Peru) = es-pe
Spanish (Puerto Rico) = es-pr
Spanish (Traditional Sort) = es
Spanish (United States) = es-us
Spanish (Uruguay) = es-uy
Spanish (Venezuela) = es-ve
Sutu = sx
Swahili = sw
Swedish (Finland) = sv-fi
Swedish = sv
Syriac = syr
Tamil = ta
Tatar = tt
Telugu = te
Thai = th
Tsonga = ts
Tswana = tn
Turkish = tr
Ukrainian = uk
Urdu = ur
Uzbek (Cyrillic) = uz
Uzbek (Latin) = uz
Vietnamese = vi
Xhosa = xh
Yiddish = yi
Zulu = zu

Country abbreviation list:

A2 COUNTRY
AF AFGHANISTAN
AL ALBANIA
DZ ALGERIA
AS AMERICAN SAMOA
AD ANDORRA
AO ANGOLA
AI ANGUILLA
AQ ANTARCTICA
AG ANTIGUA AND BARBUDA
AR ARGENTINA
AM ARMENIA
AW ARUBA
AU AUSTRALIA
AT AUSTRIA
AZ AZERBAIJAN
BS BAHAMAS
BH BAHRAIN
BD BANGLADESH
BB BARBADOS
BY BELARUS
BE BELGIUM
BZ BELIZE
BJ BENIN
BM BERMUDA
BT BHUTAN
BO BOLIVIA
BA BOSNIA AND HERZEGOWINA
BW BOTSWANA
BV BOUVET ISLAND
BR BRAZIL
IO BRITISH INDIAN OCEAN TERRITORY
BN BRUNEI DARUSSALAM
BG BULGARIA
BF BURKINA FASO
BI BURUNDI
KH CAMBODIA
CM CAMEROON
CA CANADA
CV CAPE VERDE
KY CAYMAN ISLANDS
CF CENTRAL AFRICAN REPUBLIC
TD CHAD
CL CHILE
CN CHINA
CX CHRISTMAS ISLAND
CC COCOS (KEELING) ISLANDS
CO COLOMBIA
KM COMOROS
CG CONGO
CD CONGO, THE DRC
CK COOK ISLANDS
CR COSTA RICA
CI COTE D'IVOIRE
HR CROATIA (local name: Hrvatska)
CU CUBA
CY CYPRUS
CZ CZECH REPUBLIC
DK DENMARK
DJ DJIBOUTI
DM DOMINICA
DO DOMINICAN REPUBLIC
TP EAST TIMOR
EC ECUADOR
EG EGYPT
SV EL SALVADOR
GQ EQUATORIAL GUINEA
ER ERITREA
EE ESTONIA
ET ETHIOPIA
FK FALKLAND ISLANDS (MALVINAS)
FO FAROE ISLANDS
FJ FIJI
FI FINLAND
FR FRANCE
FX FRANCE, METROPOLITAN
GF FRENCH GUIANA
PF FRENCH POLYNESIA
TF FRENCH SOUTHERN TERRITORIES
GA GABON
GM GAMBIA
GE GEORGIA
DE GERMANY
GH GHANA
GI GIBRALTAR
GR GREECE
GL GREENLAND
GD GRENADA
GP GUADELOUPE
GU GUAM
GT GUATEMALA
GN GUINEA
GW GUINEA-BISSAU
GY GUYANA
HT HAITI
HM HEARD AND MC DONALD ISLANDS
VA HOLY SEE (VATICAN CITY STATE)
HN HONDURAS
HK HONG KONG
HU HUNGARY
IS ICELAND
IN INDIA
ID INDONESIA
IR IRAN (ISLAMIC REPUBLIC OF)
IQ IRAQ
IE IRELAND
IL ISRAEL
IT ITALY
JM JAMAICA
JP JAPAN
JO JORDAN
KZ KAZAKHSTAN
KE KENYA
KI KIRIBATI
KP KOREA, D.P.R.O.
KR KOREA, REPUBLIC OF
KW KUWAIT
KG KYRGYZSTAN
LA LAOS
LV LATVIA
LB LEBANON
LS LESOTHO
LR LIBERIA
LY LIBYAN ARAB JAMAHIRIYA
LI LIECHTENSTEIN
LT LITHUANIA
LU LUXEMBOURG
MO MACAU
MK MACEDONIA
MG MADAGASCAR
MW MALAWI
MY MALAYSIA
MV MALDIVES
ML MALI
MT MALTA
MH MARSHALL ISLANDS
MQ MARTINIQUE
MR MAURITANIA
MU MAURITIUS
YT MAYOTTE
MX MEXICO
FM MICRONESIA, FEDERATED STATES OF
MD MOLDOVA, REPUBLIC OF
MC MONACO
MN MONGOLIA
MS MONTSERRAT
MA MOROCCO
MZ MOZAMBIQUE
MM MYANMAR (Burma)
NA NAMIBIA
NR NAURU
NP NEPAL
NL NETHERLANDS
AN NETHERLANDS ANTILLES
NC NEW CALEDONIA
NZ NEW ZEALAND
NI NICARAGUA
NE NIGER
NG NIGERIA
NU NIUE
NF NORFOLK ISLAND
MP NORTHERN MARIANA ISLANDS
NO NORWAY
OM OMAN
PK PAKISTAN
PW PALAU
PA PANAMA
PG PAPUA NEW GUINEA
PY PARAGUAY
PE PERU
PH PHILIPPINES
PN PITCAIRN
PL POLAND
PT PORTUGAL
PR PUERTO RICO
QA QATAR
RE REUNION
RO ROMANIA
RU RUSSIAN FEDERATION
RW RWANDA
KN SAINT KITTS AND NEVIS
LC SAINT LUCIA
VC SAINT VINCENT AND THE GRENADINES
WS SAMOA
SM SAN MARINO
ST SAO TOME AND PRINCIPE
SA SAUDI ARABIA
SN SENEGAL
SC SEYCHELLES
SL SIERRA LEONE
SG SINGAPORE
SK SLOVAKIA (Slovak Republic)
SI SLOVENIA
SB SOLOMON ISLANDS
SO SOMALIA
ZA SOUTH AFRICA
GS SOUTH GEORGIA AND SOUTH S.S.
ES SPAIN
LK SRI LANKA
SH ST. HELENA
PM ST. PIERRE AND MIQUELON
SD SUDAN
SR SURINAME
SJ SVALBARD AND JAN MAYEN ISLANDS
SZ SWAZILAND
SE SWEDEN
CH SWITZERLAND
SY SYRIAN ARAB REPUBLIC
TW TAIWAN, PROVINCE OF CHINA
TJ TAJIKISTAN
TZ TANZANIA, UNITED REPUBLIC OF
TH THAILAND
TG TOGO
TK TOKELAU
TO TONGA
TT TRINIDAD AND TOBAGO
TN TUNISIA
TR TURKEY
TM TURKMENISTAN
TC TURKS AND CAICOS ISLANDS
TV TUVALU
UG UGANDA
UA UKRAINE
AE UNITED ARAB EMIRATES
GB UNITED KINGDOM
US UNITED STATES
UM U.S. MINOR ISLANDS
UY URUGUAY
UZ UZBEKISTAN
VU VANUATU
VE VENEZUELA
VN VIET NAM
VG VIRGIN ISLANDS (BRITISH)
VI VIRGIN ISLANDS (U.S.)
WF WALLIS AND FUTUNA ISLANDS
EH WESTERN SAHARA
YE YEMEN
YU Yugoslavia (Serbia and Montenegro)
ZM ZAMBIA
ZW ZIMBABWE