BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

NEWBIE: Help with Internationalization

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internationalization
View previous topic :: View next topic  
Author Message
BMacF
Guest





PostPosted: Tue Aug 12, 2003 2:55 pm    Post subject: NEWBIE: Help with Internationalization Reply with quote



Can somebody please help me, I want to develop my application to be
culturally independant, but I don't know how. I understand the concept of
isolating strings and formatting the dates, currency, etc... but as far as
how to do it, I am not sure. I created a small test interface which
contains Labels, Editboxes and Buttons.
I declared my strings using 'resourcestring' and then used the Resource DLL
Wizard to create my resource files (English & French). This is where I am
at a loss ... where and what do I translate? How can I switch resource
files (at runtime)? I looked at the RichEdit example that ships with
Delphi, but it doesn't seem to work, and besides, I'm not 100% sure what
they're doing exactly. I found some web resources about I18n, but nothing
for Delphi, and nothing very concise either for that matter.
If anyone has any information, tips & tricks, or any resources pertaining to
I18n using Delphi, I would be extremely greatful.

Thanks in advance,
BMacF



Back to top
Leo Saguisag (Borland)
Guest





PostPosted: Tue Aug 12, 2003 3:13 pm    Post subject: Re: NEWBIE: Help with Internationalization Reply with quote



"BMacF" <bruce (AT) cidif (DOT) org> wrote

Quote:
Can somebody please help me, I want to develop my application to be
culturally independant, but I don't know how. I understand the concept of
isolating strings and formatting the dates, currency, etc... but as far as
how to do it, I am not sure. I created a small test interface which
contains Labels, Editboxes and Buttons.
I declared my strings using 'resourcestring' and then used the Resource
DLL
Wizard to create my resource files (English & French). This is where I am
at a loss ... where and what do I translate? How can I switch resource
files (at runtime)? I looked at the RichEdit example that ships with
Delphi, but it doesn't seem to work, and besides, I'm not 100% sure what
they're doing exactly. I found some web resources about I18n, but nothing
for Delphi, and nothing very concise either for that matter.
If anyone has any information, tips & tricks, or any resources pertaining
to
I18n using Delphi, I would be extremely greatful.

First of all, what version (version number, SKU, service packs, etc.) of
Delphi are you using? It'll be easier for people to provide help for you if
people are aware of what version of Delphi you're using.

As far as handling resources goes, switching resources at runtime is already
performed for you by the VCL. For example, if you have an application named
"myapplication.exe" and a resource-only DLL with French (France) resources
named "myapplication.FR", what happens upon application startup is as
follows:

(1) The startup code looks for a locale override, which is a registry entry
located under HKCUSoftwareBorlandLocales. If this key does not exist,
later versions of Delphi (I believe D6 onward) will look under
HKLMSoftwareBorlandLocales for a locale override entry. The locale
override entry is basically your application filename as the key, and the
locale override value (e.g. "FR") as the value. If a locale override
exists, then it will look for resources in a resource-only DLL for the
specified language. This allows you to force your application to come up in
a specific language other than the language of the resources bound into the
main application. Delphi itself uses this mechanism for the localized
(German, French and Japanese) versions of the product.
(2) If no locale override exists, then Delphi examines your system settings.
If, for example, you are running with French user locale settings then
Delphi will detect this and attempt to load resources from a French
resource-only DLL.
(3) After all that, Delphi will fall back to the resources bound directly
into your application.

HTH.

-- Leo




Back to top
Lars B. Dybdahl
Guest





PostPosted: Tue Aug 12, 2003 8:34 pm    Post subject: Re: NEWBIE: Help with Internationalization Reply with quote



BMacF wrote:
Quote:
Wizard to create my resource files (English & French). This is where I am
at a loss ... where and what do I translate? How can I switch resource
files (at runtime)?

The built-in translation system makes you able to translate anything, even
field names (which may not be translated), which can be very confusing.

You might want to have a look at http://dxgettext.sf.net/ instead. You may
also want to read the first chapter of the new documentation which you can
find here:

http://dybdahl.dk/dxgettext/docs/online/introduction.html

Lars.

--
Freelance programmer
Denmark

Free GNU gettext for Delphi i18n/localization tool:
http://dybdahl.dk/dxgettext/

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internationalization All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.