Board index » delphi » Delphi Gettext and Charset

Delphi Gettext and Charset


2003-11-21 07:22:23 AM
delphi212
Hi,
I know this isn't really the right place to ask, but I figure it is close.
We are just starting to use the GNU Gettext package to translate from
English to Japanese, and I was wondering, should the TranslateComponent set
the Charset of components, or do I have to do this manually.
Thanks
Simon
 
 

Re:Delphi Gettext and Charset

Simon Macneall <macneall-at-iinet.net.au>writes:
Quote
I know this isn't really the right place to ask, but I figure it is close.
Otherwise try groups.yahoo.com/group/dxgettext
Quote
We are just starting to use the GNU Gettext package to translate from
English to Japanese, and I was wondering, should the TranslateComponent
set the Charset of components, or do I have to do this manually.
TranslateComponent uses widestring internally, and all assignments to
ansistring properties will be converted by Win32 to the current 8-bit
character set.
Since I haven't created a non-unicode japanese application myself, I think
somebody else should answer whether you should set the charset.
Lars.
--
{*word*137} programmer
Denmark
Free GNU gettext for Delphi i18n/localization tool:
dybdahl.dk/dxgettext/
 

Re:Delphi Gettext and Charset

Actually, charset should be set as part of font localization, i.e., if
you can change the font name, charset should be changed too. This is
true for some fonts that span more than one charset and you have to
explicitly tell the OS which charset you wish to use. This is a good
practice even for Unicode programs, because in Windows NT, there is no
font linking and failing to specify a charset may result in squares
being displayed (not question marks).
Francisco
Lars B. Dybdahl writes:
Quote
Simon Macneall <macneall-at-iinet.net.au>writes:

>I know this isn't really the right place to ask, but I figure it is close.


Otherwise try groups.yahoo.com/group/dxgettext


>We are just starting to use the GNU Gettext package to translate from
>English to Japanese, and I was wondering, should the TranslateComponent
>set the Charset of components, or do I have to do this manually.


TranslateComponent uses widestring internally, and all assignments to
ansistring properties will be converted by Win32 to the current 8-bit
character set.

Since I haven't created a non-unicode japanese application myself, I think
somebody else should answer whether you should set the charset.

 

Re:Delphi Gettext and Charset

FL <XXXX@XXXXX.COM>wrote in
Quote
Actually, charset should be set as part of font localization, i.e., if
you can change the font name, charset should be changed too. This is
true for some fonts that span more than one charset and you have to
explicitly tell the OS which charset you wish to use. This is a good
practice even for Unicode programs, because in Windows NT, there is no
font linking and failing to specify a charset may result in squares
being displayed (not question marks).

Francisco

So, given we want 1 exe to work on all supported languages, we should
choose a font that works correctly for all cases? I have changed our font
from "Arial Black" which the project creator used, to "Tahoma", whose
default charset works in both English and Japanese, or should I be
switching the font/charset manually at runtime?
Thanks
Simon
 

Re:Delphi Gettext and Charset

Simon Macneall writes:
Quote
So, given we want 1 exe to work on all supported languages, we should
choose a font that works correctly for all cases? I have changed our font
from "Arial Black" which the project creator used, to "Tahoma", whose
default charset works in both English and Japanese, or should I be
switching the font/charset manually at runtime?
Consider the font name/charset as an atomic unit for localization. When
you are localizing, change both these attributes. In Win2000/XP, there
is font linking, so charset is not that important. But this is not so
with previous OSes like Windows NT or Win9x.
Francisco