🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #13662

Re: LoadString and default stringtable

#13662
From: Thorsten Kettner
Date: Tue, 23 Sep 2003 07:08
61 lines
3051 bytes
"Thorsten Kettner" <QUESTIONBYthorsten.kettner@otto.de> wrote:
>
>Hi all,
>I am trying to build an rc file containing a German stringtable
>and a default string table for all other language settings. 
[snip]

Thank you for your answers Bob and Chris. I know I can build 
separate resource dlls and of course I can use different ids 
for different languages, but I think the way I describe should 
also work and it would be extremely easy to code. I have tested
an rc file with four tables:

#define IDS_TEST 1000

STRINGTABLE DISCARDABLE
LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
BEGIN
IDS_TEST "LANG_GERMAN, SUBLANG_NEUTRAL"
END

STRINGTABLE DISCARDABLE
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
BEGIN
IDS_TEST "LANG_GERMAN, SUBLANG_GERMAN"
END

STRINGTABLE DISCARDABLE
LANGUAGE LANG_NEUTRAL, SUBLANG_DEFAULT
BEGIN
IDS_TEST "LANG_NEUTRAL, SUBLANG_DEFAULT"
END

STRINGTABLE DISCARDABLE
LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
BEGIN
IDS_TEST "LANG_ENGLISH, SUBLANG_NEUTRAL"
END

Here is what LoadStr/LoadString give me for a specific Windows 
setting:

Windows setting:    LoadString result:
German/Germany      LANG_GERMAN, SUBLANG_GERMAN
German/Austria      LANG_GERMAN, SUBLANG_NEUTRAL
English/UK          LANG_ENGLISH, SUBLANG_NEUTRAL
English/USA         LANG_ENGLISH, SUBLANG_NEUTRAL
French/France       LANG_GERMAN, SUBLANG_GERMAN

You see everything works fine, except for the unknown language
(French in this case). Seeing that it defaults to German/Germany
I thought this is because my computer is German. So I deleted
the rc entries LANG_GERMAN, SUBLANG_GERMAN and LANG_GERMAN,
SUBLANG_NEUTRAL. But then I got LANG_ENGLISH, SUBLANG_NEUTRAL
for French! This shows LANG_NEUTRAL, SUBLANG_DEFAULT is just
not the correct entry for a default, but has some other meaning.
But there must be a default setting! It cannot be that French 
people get a random language!

Does anybody else know how to declare the default stringtable?
Technical Details
Message-ID: <3f6ff164@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3f6ef786@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,4daae65cffc0dd68
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-09-23 00:13:43 PST
From: "Thorsten Kettner" <QUESTIONBYthorsten.kettner@otto.de>
Sender: "Thorsten Kettner" <QUESTIONBYthorsten.kettner@otto.de>
Reply-To: "Thorsten Kettner" <QUESTIONBYthorsten.kettner@otto.de>
Subject: Re: LoadString and default stringtable
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 80.85.196.91 80.85.196.91    
X-Forwarded-For: 129.225.1.108, 129.0.6.11
References:  <3f6ef786@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.65
Message-ID: <3f6ff164@newsgroups.borland.com>
Date: 23 Sep 2003 00:08:20 -0700
X-Trace: newsgroups.borland.com 1064300900 207.105.83.65 (23 Sep 2003 00:08:20 -0700)
Lines: 61
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail