Chinese Language Translation
Steven Burrows
We are experienced in running our application in other European languages in a pretty simplistic way. Just mls_bld the file text file, and let windows sort it out. Never needed Code Pages, MGConst, extra Fonts or special Collation files, users have never raised it as an issue.
Now we want a Demo in Chinese (Simplified), but cant get mls_bld.exe to provide the correct translation
English in Text File : “Primary” Translated by user in Text file : “主要的” (Google translates this back as “Main”, so it is close) After mls_bld.exe (and on screen in XPA) : “銝餉” (Google translates this back as “Dusk” so is wrong)
This is with Code page 950. We have tried all sorts of code pages but none of them are any better. Are there any secrets to getting a Chinese Language Translation ?
|
|||
|
|||
Steven Burrows
Annoyingly, if we use an old mls_bld.exe dated 2013 (for Magic 8), we get the correct translations, but causes an Out of Memory error in XPA.
From: main@magicu-l.groups.io <main@magicu-l.groups.io>
On Behalf Of Steven Burrows
Sent: 15 January 2019 12:16 To: magicu-l@groups.io Subject: [magicu-l] Chinese Language Translation
We are experienced in running our application in other European languages in a pretty simplistic way. Just mls_bld the file text file, and let windows sort it out. Never needed Code Pages, MGConst, extra Fonts or special Collation files, users have never raised it as an issue.
Now we want a Demo in Chinese (Simplified), but cant get mls_bld.exe to provide the correct translation
English in Text File : “Primary” Translated by user in Text file : “主要的” (Google translates this back as “Main”, so it is close) After mls_bld.exe (and on screen in XPA) : “銝餉” (Google translates this back as “Dusk” so is wrong)
This is with Code page 950. We have tried all sorts of code pages but none of them are any better. Are there any secrets to getting a Chinese Language Translation ?
|
|||
|
|||
Andy Jerison
I don't speak Chinese and certainly can't read it, but I'm pretty sure I can distinguish the two versions of Chinese idiograms. The ones in your text file are clearly Simplified Chinese, and the ones you're getting are Traditional Chinese. I don't know whether this helps, but it may be useful for troubleshooting. Andy On Tue, Jan 15, 2019 at 7:15 AM Steven Burrows <steven.burrows@...> wrote:
|
|||
|
|||
Hi Steven,
I tried that, and it works fine for me. You must be doing something wrong. Probably the source file for mls_build is not encoded with the character set you specify on command line. Typically these "chinese looking text" containing nonsense when you translate it you also get if the file is Unicode (english text) in wrong byte order (big endian instead of Windows default little endian). Maybe thats the issue ? I used your sample and used it for a German->Chinese .mls source file (mls_test.txt which I created with notepad and then saved as text file with encoding "UTF-8"). The mls_build command then is: %MagicPath%\mls_build.exe .\mls_test.txt .\mls_test.mls 65001 That file I added as "language" in magic. On top a label with German word "Haupt" (which gets automatcally translated), second a edit field with data expression = MlsTrans('Haupt'). In both cases the translation makes it finally to screen. Font is Arial on Windows 10. Thats however not relevant if your .mls file is already corrupted |
|||
|
|||
Steven Burrows
Thanks, 65001 wasn’t one of the 6 or more codes I tried. Appears to work !
I had reported it to MSE, and they accepted it as a bug raising a Defect for it.
From: main@magicu-l.groups.io <main@magicu-l.groups.io>
On Behalf Of Andreas Sedlmeier
Sent: 16 January 2019 12:26 To: main@magicu-l.groups.io Subject: Re: [magicu-l] Chinese Language Translation
[Edited Message Follows] Hi Steven, |
|||
|
|||
Andreas Sedlmeier
950 or 951 (probably) works too, if the codepage is indeed used for that text file and I would not know how to produce one on my system unless I create a Unicode file and do a code page conversion form UTF-16/UTF-8 -> CP950. That's not needed with Magic anymore since Unicode support has been added. mls-build can deal with Unicode files. MSE just never came up with a modern none-legacy naming scheme for codepage specifications (like Java or .NET have). Its still the Windows legacy codes which have to be used and what you use for Java in Magic or or on Linux .. I do not really know ...
Andreas |
|||
|
|||
Gary Santiago
Good Day!
Hi Newby here. Would like to ask how can I make my xpa 3.3a system display and accept chinese character.? I have found a sample program from google translate but the display I get when I translate is ascii code special characters. Hoping for your kind assistance. Thank You! Gary |
|||
|
|||
Steven Burrows
First thing – The variable containing the Chinese has to be Unicode
Steven Burrows
From: main@magicu-l.groups.io <main@magicu-l.groups.io>
On Behalf Of dtpigary2011 via groups.io
Sent: 27 January 2023 04:16 To: main@magicu-l.groups.io Subject: Re: [magicu-l] Chinese Language Translation
This email is not from Hexagon’s Office 365 instance. Please be careful while clicking links, opening attachments, or replying to this email.
Good Day! |
|||
|
|||
Gary Santiago
Thank you for your email. I will try that now. On Fri, Jan 27, 2023, 2:38 PM Steven Burrows <steven.burrows@...> wrote:
|
|||
|