#1 2021-04-30 09:29:52

charlesqin
Member
Registered: 2020-10-14
Posts: 7

Localization (L10n) problem

translate to Chinese display Mistaken Code

in zh.msg like this
[TForm1]
Label1.Caption=_3144095710   Your name:
Label2.Caption=_2359705126   Your message:
AddButton.Caption=_1211734403   Add the message qqs
QuitButton.Caption=_2664133969   Quit

[Messages]
3144095710=Your name test: <---- this no problem 
2664133969=退出  <---- this Chinese display like 閫€鍑?

Offline

#2 2021-04-30 10:01:23

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,240
Website

Re: Localization (L10n) problem

Perhaps the charset used for zh.msg is not the one expected by mormoti18n.pas.

Which version of Delphi are you using?

Offline

#3 2021-05-06 01:40:05

charlesqin
Member
Registered: 2020-10-14
Posts: 7

Re: Localization (L10n) problem

thanks ab, i'm change the charset of the zh.msg then solve the problem.

but another problem is that,  the main language of my application is chinese,

when i call the ExtractAllResources procedure, chinese in the generate template (eg. Project04Client.messages) is convert to Question marks(????)

i kown it need WinAnsi String, but there is any way to translate  from chinese to english ?

thanks.

Offline

#4 2021-05-06 06:11:40

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,240
Website

Re: Localization (L10n) problem

Sadly, this is as designed.
The idea of "ExtractAllResources" was that the application is written in English in the captions, then translated to whatever language you need.
This is a limitation of the current design.

Offline

Board footer

Powered by FluxBB