Kbase P110682: How to use TranMan to translate languages that use incompatible code pages.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  15/10/2009 |
|
Status: Unverified
GOAL:
How to use TranMan to translate between languages that use incompatible code pages.
GOAL:
Can Translation Manager be used to convert languages that are supported by incompatible code pages and locales?
FACT(s) (Environment):
Translation Manager 2.0
Windows
Progress 9.x
OpenEdge 10.x
FIX:
This can be done for example with a French application translating to Turkish, but it is not straight forward. The import things to remember when doing this are:
1. The TranMan Database must use the 'undefined' code page. This is the default for TranMan.
2. r-code created for each locale (e.g. French and Turkish) will only be able to run in a compatible session. So the Turkish r-code will not run in the French session and vice versa.
As an example, a session could be started using cpinternal and cpstream settings for French (1252) or Turkish (1254), but this means that the extended characters (non ASCII English characters - e.g. French accented characters, but also Turkish specific characters) will not display correctly for the other language type. So if Translation Manager is started with -cpinternal 1252 -cpstream 1252 (French) then the Turkish characters will not display correctly. If Translation Manager is started with -cpinternal 1254 -cpstream 1254 (Turkish) then the French characters will not display correctly. However the translations will have to be made based on what characters are readable. It is hoped that this is enough to identify the string, but this may require a certain amount of trial and error, since the more characters that are not readable, the more difficult it will be to identify the string.
A suggested sequence of doing this would be:
1. Start a French (1252) session and create a new TranMan database.
2. Import the strings for the application into the TranMan database.
3. Start a Turkish (1254) session and connect to the TranMan database.
4. Translate the French strings to Turkish.
5. Create the Turkish r-code in the Turkish TranMan session with the compiler.
6. Connect again to the TranMan database with a French session and create the French r-code with the TranMan compiler.
In OpenEdge 10.x an alternative and better solution would be to use UTF-8. The UTF-8 client removes the difficulty of translating between such incompatible code pages, since a UTF-8 client can display all characters. However when extracting and importing the text strings from the source code, the -cpstream session startup parameter should reflect the code page that the source code was written in. If this isn't done then the strings will be corrupted as they are imported. So in step 1 above, in this case this session would be started with:
prowin32.exe -cpinternal UTF-8 -cpstream 1252 -cpcoll basic
After the strings are imported, the UTF-8 client session can be used instead of the 1254 session (in step 3 above) to translate and compile, creating UTF-8 r-code. This r-code could then run in any region, removing the need to create multiple region specific r-code files.
Two important things to remember when using the UTF-8 client for translation is:
1. ALL source strings in the Translation Manager database must have been imported with a session started with -cpinternal UTF-8.
2. Any translations made with Translation Manager or Visual Translator sessions must use -cpinternal UTF-8. If there is a mixture of source strings or translations in the database using several code pages other than UTF-8, because single byte extended characters are represented by multiple UTF-8 bytes, source strings will not be found at compile time and the translation will not work.