Page 1 of 1
Localization char set problem
Posted: Wed Jul 07, 2010 3:44 am
by yosilevy
Hi,
A localization font issue - as installaware seems to be using ansi for localized strings on computers in which the default charset for non-unicode is wrong, the text shows up garbled.
I tried adding to the MIAF a line such as :
IF (lblLanguage.Caption = Hebrew) THEN Label1.Font.Chatset := HEBREW_CHARSET;
but it seems to be ignored.
What is the right syntax for this?
If this can't work then what's my alternative - I can't build a different set of dialogs just because of this...
Much appreciated.
Re: Localization char set problem
Posted: Wed Jul 07, 2010 3:51 am
by MichaelNesmith
Chatset or Charset?
Re: Localization char set problem
Posted: Wed Jul 07, 2010 4:16 am
by yosilevy
Right you were. Spelling mistake.
This is the correct line but it still doesn't work:
IF (lblLanguage.Caption = Hebrew) THEN Label1.Font.Charset := ANSI_CHARSET;
Should the ANSI_CHARSET be in quotes? Are multi-level (Font.Charset) properties supported?
What do you recommend?
Re: Localization char set problem
Posted: Wed Jul 07, 2010 8:22 am
by yosilevy
Anyone?
Re: Localization char set problem
Posted: Wed Jul 07, 2010 1:45 pm
by MichaelNesmith
Did you try the ANSI_CHARSET on the form first to make sure it works correctly - so we know what the correct property to set is before checking if sub properties are supported?
Re: Localization char set problem
Posted: Wed Jul 07, 2010 9:29 pm
by yosilevy
Since I couldn't find a way to modify form properties (as per my previous posts about BidiMode), I tried to set each individual control's charset...
Not sure If I got you - setting Charset to ANSI_CHARSET produces the bad result on machines in which the right Charset IS set. Not sure why but the only reliable way is to set it to hebrew which works on both machines that have it set and not-set.
I'm hoping you'll come back with a solution to setting the sub-properties.
Thanks for your help.
Re: Localization char set problem
Posted: Wed Jul 07, 2010 11:05 pm
by MichaelNesmith
Did you also try DEFAULT_CHARSET?
Re: Localization char set problem
Posted: Wed Jul 07, 2010 11:13 pm
by yosilevy
That was the initial default setting. To sum it up:
DEFAULT_CHARSET works fine on all machines in which the non-unicode charset is set to the target language (hebrew). This also shows english fine off course.
ANSI_CHARSET doesn't work properly on the machines for which DEFUALT_CHARSET does.
HEBREW works for both.
Is this in anyway related to the encoding of the translation files? Can I somehow produce unicode strings and be done with it?
We're releasing tomorrow. Please help.e
Thanks.
Re: Localization char set problem
Posted: Thu Jul 08, 2010 12:22 am
by MichaelNesmith
You cannot use Unicode, I'm afraid. To support Win9X-Win2008R2 with a single setup binary, we have to use ANSI.
The easiest way to quickly fix this for you would be to duplicate your dialogs and add them all to your project, showing the HEBREW versions when applicable.
This will get the job done with zero overhead.
Re: Localization char set problem
Posted: Thu Jul 08, 2010 12:36 am
by yosilevy
Sounds good but please enlighten me how do I duplicate the dialogs (that's easy - I know the files) and link them to the project? Currently I have batch files that build with the /l parameter (if I remember correctly) that sets the language... I'd like to keep my build process intact.
Thanks again.
Re: Localization char set problem
Posted: Thu Jul 08, 2010 3:40 am
by MichaelNesmith
Create a copy of all the files ending in extension .dfm and .dfm.miaf and .dfm.baggage,
Rename them all consistently to whatever you like,
Add them all to your project using the Project Manager / Dialogs node,
Update your Display Dialog statements to display the correct set of dialogs based on the value of the LANGUAGE variable.
Re: Localization char set problem
Posted: Thu Jul 08, 2010 3:51 am
by yosilevy
Sounds good. Will do and let you know.
Re: Localization char set problem
Posted: Sat Jul 10, 2010 9:58 am
by yosilevy
After having done this, I learned that all is well except for the buttons. These don't obey the new character set setting of HEBREW_CHARSET. I've tried every font. Works perfectly for all other controls except buttons.
Any ideas?
Re: Localization char set problem
Posted: Sat Jul 10, 2010 12:33 pm
by yosilevy
Nevermind previous post - it doesn't work but we just notify the user to go fix it in Control Panel and that's it.
Another problem is that now, even when building in English, all UI is in English but popup message such as "Are you sure you want to cancel?" pops up in hebrew...
This is not an OS question off course so what's causing this?
Thanks.
Re: Localization char set problem
Posted: Sun Jul 11, 2010 9:47 am
by yosilevy
Any ideas?