Article View: borland.public.cppbuilder.nativeapi
Article #13653Re: LoadString and default stringtable
From: Bob Gonder
Date: Mon, 22 Sep 2003 16:53
Date: Mon, 22 Sep 2003 16:53
46 lines
2620 bytes
2620 bytes
Thorsten Kettner wrote: > LANGUAGE LANG_NEUTRAL, SUBLANG_DEFAULT and > LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL > >but whatever language setting I do in Windows, I always get the >German texts. Did you try LANGUAGE LANG_NEUTRAL,SUBLANG_SYS_DEFAULT? >I replaced LANG_NEUTRAL, SUBLANG_DEFAULT by LANG_NEUTRAL, >SUBLANG_NEUTRAL, but this gives me the default texts always, even >if my Windows setting is German. Are they position dependant...as in the first match is what it uses? If so, then German should be before Neutral. >As far as I know, LoadString tries to find an exact match first >(like GERMAN,GERMAN). If it fails it looks for the country >independent stringtable (GERMAN,NEUTRAL). And if that fails, it >looks for a default table (NEUTRAL,DEFAULT? or should that be >NEUTRAL,NEUTRAL? Both makes sense, neither works). My reading of LoadString is that it loads the resource. Period. It looks like it is up to you to supply the correct resource ID . I think the original intent was for you to have seperate RC files for each language, and to link them individually for each destination. I suppose you could have something like this... #define string1 0x4000 #define string2 0x4001 STRINGTABLE LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL BEGIN string1 "This is German string 1" string2 "This is German string 2" END STRINGTABLE LANGUAGE LANG_NEUTRAL, SUBLANG_DEFAULT BEGIN string1+0x1000 "This is neutral string 1" string2+0x1000 "This is neutral string 2" END LoadString( hInst, string1+(IsThisGerman()?0:0x1000), buffer, sizeof(buffer)-1 );
Technical Details
Message-ID:
<og6umv4jrq6g30dbdpbk7d27re4ss8okcg@4ax.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeeds.sol.net!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<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-22 10:02:12 PST From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: LoadString and default stringtable Date: Mon, 22 Sep 2003 09:53:56 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <og6umv4jrq6g30dbdpbk7d27re4ss8okcg@4ax.com> References: <3f6ef786@newsgroups.borland.com> X-Newsreader: Forte Agent 1.91/32.564 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 67.31.165.246 X-Trace: newsgroups.borland.com 1064249639 67.31.165.246 (22 Sep 2003 09:53:59 -0700) Lines: 48 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeeds.sol.net!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail