Translation using command line

Posted by hugochouinard on 25-Nov-2011 15:59

Hi,

I'm using translation manager to apply a french  glossary to a english database.  Now instead of compiling my sources to  r-code with the languages of my choice in Translation Manager I am  trying to do it with a command line.  I am connecting to my main  database AND the translation database and both work.  Then I use

COMPILE myFile.w  LANGUAGES(French:English) SAVE.

It  compiles, I see the French layer in the r-code but the French strings  are not found in the translation database so the English ones are still  there.  And everything works fine when I compile with the Translation  Manager.  I'm wondering if there is a specific name I have to name my  translation database.  How does the compiler knows which one it is?

Thanks for your advices.

Hugo

All Replies

Posted by Torben on 26-Nov-2011 01:44

We have excact same setup and it works for us!

      COMPILE
         myFile.w
         LANGUAGES (DKK,GBP,FRF,CST:DKK)
         SAVE INTO C:/Compiled
         .

where DKK,GBP,FRF,CST are the languages we have defined in translation databases.

We call our apitrans.db and csttrans.db for standard translations and customized translations.

Seems like it searches for text in translation databases in the sequence they are connected.

Posted by hugochouinard on 28-Nov-2011 08:36

Hello,

I finally realized that I was using this to compile:

COMPILE VALUE(SEARCH("myProg.w")) LANGUAGES (English,French) SAVE.

So since the VALUE(SEARCH()) returns the full path of the file it was not matching anything in the translation database.

Problem solved.  Thanks a lot for your answer Torben.

Hugo

Posted by Torben on 28-Nov-2011 20:55

So you have not done global translation but only instance translation?

For most strings and text we make a global translation and only instance translations for text where translation for target language differs.

This ensures that when making new programs all the strings that already have a global translation are already translated in the new program.

So only new strings or strings where you want instance translation need to be translated for the new program.

Torben

Posted by hugochouinard on 29-Nov-2011 07:50

I'm just in the process of analysing how we could get our application translated.

If by global translation you mean kind of a main glossary and another for the more specific stuff then yes I was thinking about doing something like that.  But my idea was to do it with text files (csv), a global one and a specific one and importing both in the database glossary.  Maybe it would be a better idea to try to do it like you do.

What I would like to do is make it all possible without having to open translation mangager.  Is it possible to apply the glossary to the scanned sentences by command line?

I'm still figuring out how translation manager is working and how to integrate it in our compilation process flow.  We also have a mixed environment of .NET and non .NET stuff.

Thanks again your inputs are really appreciated.

Hugo

Posted by Torben on 29-Nov-2011 12:37

You can do it using the standard OpenEdge database dump/load utilities.

Import/export to Excel or other. Just mind that you don't mix code-pages!

The translation database are hidden tables starting with XL_

XL_string_info: String from source code

XL_languages: Languges

XL_instance: Link between string and source code

XL_translation: Actual translation (If Instance-id = 0 then it is a global translation)

Structure of XL_translation:

String-id, Instance-id, Language, Translation, Timestamp

This thread is closed