TB/TB-2008-02-L18N

From Scalix Wiki
Revision as of 07:12, 10 May 2008 by Florian (Talk | contribs) (Localizing Outlook)

Jump to: navigation, search

TB -> TB-2008-02-L18N

Overview

Using UTF8 character encoding, Scalix provides full multi-byte language support, coupled with an open-source localization kit for channel partners and customers to facilitate international deployments.

Localizing Outlook

You can localize the MAPI Connector for any language that Outlook supports.

Tools

For this procedure, you need the following:

Procedures

To localize the MAPI Connector:

1. Use your preferred editing and translation tools to localize the English strings in the following file.

 SCLXRES\RESEN.RC

and in all sub-files of the SCLXRES\EN subdirectory.

2. Make sure you can save the file with the proper font files.

3. From the directory SCLXRES, run the resource compiler. The command is:

 rc /l<LCID Culture ID> /fo "<file name>\sclxres.res" /i "..\shared\include" /i "..\common" /d "THIS_LANG_<NAME OF LANGUAGE>" sclxres.rc

Where:

 rc = The compiler command
 <LCID Culture ID> = Can be found at http://www.microsoft.co.ke/globaldev/nlsweb/default.mspx. This code number must be preceded by an “l” (a lower-case l, not an i) and must match the “THIS-LANG...” option
 l = Specifies default language for compilation. For example, -l409 is equivalent to including the following statement at the top of the   resource script file: LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US 
 fo = Renames the source file so that it comes out as a .res file
 i = The "include" command so takes a directory as its variable
 d = This variable changes according to the culture ID specified earlier
 Note that in this step, you are compiling the file SCLXRES.RC, which includes all subfiles and subfolders, and creates a new file named SCLXRES.RES to the same directory.

4. When the compiler completes, you see a new file named sclxres.res in the directory SCLXRES.

5 Using the resource compiler's LINK.EXE tool, link the .res file to produce a dll in the same directory that will be called SCLXRES.DLL. The command is:

  link /nologo /dll /pdb:none /machine:I386 /nodefaultlib /implib:"sclxres.lib" /NOENTRY sclxres.res

6. Copy the new file, SCLXRES.DLL to the MAPI Connector's installation directory.

 (The default installation directory is C:\Program Files\Scalix\Connect). 
 Note: For more on the link command, see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/html/_core_linker_reference.asp.

Localizing SWA

Localization of SWA involves translating two xml files, putting them in the appropriate location, and then restarting Tomcat.

Note: Unless your localization file is part of a Scalix distribution, you MUST do a backup before the next upgrade. If you do not, your file will be lost.

To add a new locale to SWA version 11.0:

1. Translate the files strings_en.xml and strings_en_US.xml to create the files strings_xx.xml and strings_xx_XX.xml. Those strings are located at:

  /opt/scalix-tomcat/webapps/webmail/WEB-INF/data

For example: For Nederlands Dutch, create files named string_nl.xml and strings_nl_NL.xml.

2. Stop Tomcat by running the shutdown script found at:

/etc/init.d/scalix-tomcat stop

3. If Tomcat has not already done so, unpack the war file.

4. Put the files strings_xx.xml and strings_xx_XX.xml in the WEB-INF/data directory.

5. Delete the Tomcat cache if needed by deleting the contents of the following directory.

  /opt/scalix-tomcat/work/Catalina/ directory

6. Restart Tomcat by running the start script found at:

  /etc/init.d/scalix-tomcat start

List of translations

Language/Locale Spellchecker Maintainer Download
French (FR_fr) No Vincent LE GOUIC-MARTUN

https://forge.scalix.com/gf/project/scalix_french/

Italiano (IT_it) No Andrea Lanfranchi

https://forge.scalix.com/gf/project/scalix_italian/

Example (ex_pl) No <link to your talkpage> <dl links here>

Localizing the Search and Index Service

The Scalix Search Index Service can be configured to process text for any language. To work with different languages, it uses stemming rules for that specific language, which break down words by removing suffixes and endings just as they do with the English language. For example, a search for the English word "singing" will match the word "sing".

To change the language assumed by SIS when it indexes text or builds search queries:

1. Stop Tomcat.

  /opt/scalix-tomcat/shutdown.sh

2. On the server where SIS is installed, open the following file:

 /etc/opt/scalix/sis/sis.properties

3 Edit the property, sis.language, to one of the following:

 Danish
 Dutch
 English
 Finnish
 French
 German
 Italian
 Norwegian
 Portuguese
 Russian
 Spanish
 Swedish
 (English is default)

4. In the following file:

 /var/opt/scalix-sis, 

remove existing indexes and rebuild them using the command

 sxmkindex

5. All subsequent index and search operations will use the stemming rules for the given language.

 Note: This procedure uses the Snowball Analyzer written by Martin Porter. For more information, see the Lucene API at: http://lucene.apache.org/java/docs/api/net/sf/snowball/ext/package-summary.html.

Using Custom Analyzers

For additional languages, you can use other analyzers, all of which have built-in stemmers. To use these additional stemmers:

1. In the file sis.properties, specify a custom class of your own.

  index.content.analyzer.class==com.scalix.index.message.MyRussianAnalyzer

The list of potential analyzers includes:

 BrazilianAnalyzer
 ChineseAnalyzer
 CJKAnalyzer
 CzechAnalyzer
 DutchAnalyzer
 FrenchAnalyzer
 GermanAnalyzer
 GreekAnalyzer

2. The class must be implemented like this:

 import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.analysis.ru.RussianAnalyzer;
 import com.scalix.index.message.MessageAnalyzer;
 public class MyRussianAnalyser extends MessageAnalyzer {
     public Analyzer getAnalyzer() {
        return new RussianAnalyzer();
     }
 }

3. Compile the class and put it in the following directory so that it can be picked up by the Web Apps classloader.

 /opt/scalix-tomcat/webapps/sis/WEB-INF/classes