Localization with multiple string tables

The application has two string tables one for English and the other
for Japanese. The IDs and Values are the same but only the captions
are different. It seems that CString::LoadString does not load from
the correct string table when i choose japanese from my regional
settings on the control panel instead it loads english all the time.
Is there any settings or configuration that i missed? Need ur help
gurus

0
8/8/2007 6:08:27 AM
vc.mfc 33608 articles. 0 followers. Follow

5 Replies
1786 Views

Similar Articles

[PageSpeed] 9

>The application has two string tables one for English and the other
>for Japanese. The IDs and Values are the same but only the captions
>are different. It seems that CString::LoadString does not load from
>the correct string table when i choose japanese from my regional
>settings on the control panel instead it loads english all the time.

The method of having multiple language string tables is no longer
recommended (probably for the reasons you're hitting). The recommended
method is to have different languages in different resource DLLs and
to load the appropriate one. In MFC you'd use AfxSetResourceHandle to
set the resource DLL and thereafter LoadString would load strings from
that DLL.

Dave
0
davidl7375 (2060)
8/8/2007 7:02:37 AM
Thank you for sharing . I was just wondering if there is a work around
solution in my case since I already made and spend some time on making
the string tables.

Thanks once again

0
8/9/2007 2:54:25 AM
> Thank you for sharing . I was just wondering if there is a work around
> solution in my case since I already made and spend some time on making
> the string tables.
You can still take advantage of your string tables.
Just put them in separate files.

-- 
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
0
8/9/2007 6:35:12 AM
dacky wrote:
> Thank you for sharing . I was just wondering if there is a work around
> solution in my case since I already made and spend some time on making
> the string tables.

You need to spend some more time to make it work the recommended way.

Main problem is that there's no LoadStringEx SDK function, and there 
wouldn't be one. Recommended way is to have several resource-only DLL's, 
one of which should be loaded when the application starts. All strings, 
menus, dialogs, icons, and everything else application has should exist 
in every such DLL. When DLL is loaded just call AfxSetResourceHandle 
with its handle and that's it. If there's some common resource, which 
exists only in EXE, then load it first, and then do AfxSetResourceHandle 
thing.

Having said that this is what I found googling:

- Raymond Chen's blog entry with couple of functions (the one you need 
is AllocStringFromResourceEx)
http://blogs.msdn.com/oldnewthing/archive/2004/01/30/65013.aspx

- German forum, function is called CWinUtils::LoadStringEx
http://www.tutorials.de/forum/visualstudio-mfc/199782-string-table-resourcen-hinzufuegen.html
0
8/9/2007 1:30:20 PM
I'd just copy the file, then delete out the parts from each that don't 
apply.

We typically request separate files for each language from our translators 
(they start with English).

Tom

"dacky" <harvey.daclan@gmail.com> wrote in message 
news:1186628065.107430.131570@i13g2000prf.googlegroups.com...
> Thank you for sharing . I was just wondering if there is a work around
> solution in my case since I already made and spend some time on making
> the string tables.
>
> Thanks once again
> 

0
tom.nospam (3240)
8/9/2007 3:18:31 PM
Reply:

Similar Artilces:

two tables one query.
I have the following info and I want to create a query. [tblPayment]![strLCNumber] [tblIRB]![strLCNumber] and [tblIRB]![strAltRef] I want to do the following: Search tblIRB where both [tblPayment]![strLCNumber] & [tblIRB]![strAltRef] equal each other, but get the information attached to [tblIRB]![strLCNumber] & [tblIRB]![strAltRef] equal each other. I hope that makes since!!! SELECT * FROM tblPayment INNER JOIN tblIRB ON tblPayment.strLCNumber = tblIRB.strAltRef Hoping it may help, Vanderghast, Access MVP "Professional_in_need_of help" <Professionalinneed...

Localization dll
Hi, I am developing a hook under VS2005 and need to localize it for different countries. I added the app.resource.dll to the global assembly, but SO ignores the localized version. It uses the standard language. Does anybody has a sloution? Thanks, Martin On Wed, 18 Apr 2007 14:44:00 -0700, martin <martin@discussions.microsoft.com> wrote: >Hi, >I am developing a hook under VS2005 and need to localize it for different >countries. >I added the app.resource.dll to the global assembly, but SO ignores the >localized version. It uses the standard language. > >Does a...

Can I link Word files to an Access table?
We're going to use Access for reporting purposes, and one of the things we need to do as part of that reporting is to maintain management approvals (always in a Notes or Word file). Is it possible to add Notes or Word attachments into an Access table record (with the understanding that each record will have to have several of these approvals)? If not, is there a way to link files to a particular record?Many thanks for whatever advice you can offer....

Bubbles with multiple series
Hi everybody, I am trying to create a bubble chart that has about 10 series. Column A contains the names, column B the x value, column C the y values and column D the size. I currently have to manually add each series in the graph. Is there a way to capture all the series rather than me having to add each series one by one? All though this graph only has ten series, I have have about 13 more of these graphs to create, so adding a series one by one can add up to a lot of time. Any help will be appreciated. Maybe some VBA coding is needed. Thanks Kim On Sun, 2 Jul 2006, in mi...

Multiple IF formula
I need a formula that will give me results as follows: If S1=Bank and E1 or F1=L, 1,0 The response to S1 must be Bank, but either E1 or F1 can be L to count as 1. Both E1 and F1 don't have to meet the condition, thus the or Thanks!! As I recall you already gotten several answers to your first post regarding this =IF(AND(S1="Bank",OR(E1="L",F1="L")),1,0) or =(S1="Bank")*((E1="L")+(F1="L")) Regards, Peo Sjoblom "Kim46770" wrote: > I need a formula that will give me results as follows: > > If S1=Bank...

Pivot Table Splits Columns for same entry
I have a column that splits into two columns when plotted on the pivo table chart. The legend reads the output correctly (ie. the legen shows the value of the column is 7, but i have two columns displayed a 5 and 2) I have rearranged the pivot table layout so that my column read the output correctly, but now i have duplicates in my legend (ie there is one column of 7 but in two different colors showing the spli of 5 and 2, and in the legend there are two boxes with the appropriat colors showing a 7 for each) I was wondering if anyone has encountere such a peculiar problem with pivot tables? T...

Crosstab with Multiple data fields
I would like to make a crosstab query that can have multiple data fields such as ProdCode AcctNo SalesAmt SalesTran RetAmt RetTran I know how to do this with a pivot table but I am required to have it in Access. I can also do this with just one data field such as SalesAmt---I just don't know how to add more than one data field. Is there some workaround to this problem? Thanks, Billy Post a sample of you raw data indicating field names and how you want the results to look like. -- KARL DEWEY Build a little - Test a little "billy.rogers@chasepaymentech.com&...

multiple jpg attachments
Since upgrading from Win2000 and Outlook Express 6 to XP I can no longer easily display multiple pictures (jpg's) attached to an email. They show up in the list of attachments, but I have to explicitly open each jpg to look at them, one at a time. Previously, They all appeared automatically when reading the email and I could scoll through them quite easily. When I do open one and it appears in a viewer, it would be nice to scroll through them at that point, but this doesn't work either. This newsgroup is for support of Outlook 97, 98, 2000 & 2002 from the Office family ...

Got returned mails while send mails to a outside DL which include our local mail addresses.
Hi, Got returned mails while send mails to a outside DL which include our local mail addresses. We meet such problem,but don't know how to resolve it. The below is the detail: We have a local mail system based on iMail system;On another side,the mail system is based on Exchange system.On this Exchange system,there're several DLs,which include some our local email addresses. While we send mails to these DLs,we often got such returned mails: The returned mails' content is: From: postmaster@us.com [mailto:postmaster@us.com] Sent: 2006.4.11. 12:08 To: xxx@xx.local.com Subject: D...

Multiple Sections of a Circle Shape/text box to follow circle patt
Help! 2 part question, and I've been to Help, Google, and MVP blogs for hours and can't find an answer. As a Visio 11 Standard (2003?) user newbie, I'm having trouble resizing and aligning the 'partial' shapes of a circle, when attempting to make a circle with more than 4 sections. (Partial circles work well when you have four distinct sections, as the rotate/flip function is adequate.) My frustration is mounting, as I'm dealing with these sections as part of an 'onion' template of concentric circles, and I've now got sections for each circle all...

Charting Multiple Values per Item
Dad needs help w/son's science fair data. 5 types of balls dropped 30 times each at 3 different heights on 3 different surfaces. Need a concise way to show, visually, how drop height, ball type and surface affected rebound. Currently have line chart w/different line for each balltype showing bounce height, but seems to me I ought to be able to make Excel do something "better". I'd like to have groupings of value points per ball type. Haven't worked on the other variations (surface, drop height) yet. Thanks! George - You could make box and whisker charts, wh...

Localizing ddv error messages
Hi, I've been given an application to maintain which links statically to the MFC library. In all the dialogs of the application, if invalid data is entered, the ddv routines generate error messages in French, even though the language propert of all the dialogs is English (U.S.) and my project options include "/l 0x407". If I link dynamically to the MFC library, all error messages are generated in English. Is there a way I can link statically AND have English error messages? Any help would be appreciated. Thanks, Linda "Linda Marcellus" <linda.marcellus@novate...

Access command to select from multiple reports
I have a command button on a form that I want to use to print one or two of four letters (reports) based on the criteria tied to the persons account. Right now my statement is this: Private Sub Print_Invitation_Click() On Error GoTo Err_Print_Invitation_Click Dim stDocName As String Dim stLinkCriteria As String stDocName = "Evaluator Invitation Letters" DoCmd.OpenReport stDocName, , , stlLinkCriteria stDocName = "FA Pre-Festival Evaluator Invitation Letters" DoCmd.OpenReport stDocName, , , stlLinkCriteria stDocName = "KT Evaluator Invita...

"joining tables"
hi guys im looking to effectively create a join function similar to access fo a work project. the reason why im not doing it in access is because w dont have licences for that part of office. i have to spreadsheets, with 1 corresponding column between the two. need to create a new spreadsheet joining the two spreadsheets on tha corresponding column. i hope the example below makes sense....: -| A |--| B |--| C |- ====== -| D |--| B |--| E |--| F |- =================================== -| a |--| 1 |--| e |- ====== -| x |--| 2 |--| i |--| s |- -| p |--| 2 |--| d |- ====== -| g |--| 3 |--| f |...

Multiple domains displayed from within outlook
Does anyone know if there is a way to display 2 different domains from within the same outlook mailbox? -KJK You can only have one Exchange account but you can certainly open multiple inboxes and Exchange certainly supports more than one mail domain. You'll need to clarify your question if you want more specifics. Nue "KJK" <KJK@discussions.microsoft.com> wrote in message news:1013E372-AF26-4880-9507-AC2436F3FB15@microsoft.com... > Does anyone know if there is a way to display 2 different domains from > within > the same outlook mailbox? > > -KJK ...

Error when sending messages : 550 not local host
I have outlook 2002 and keep getting returned mail with the above error even know the mail somtimes gets delivered what causes this is it the ISP? It is the ISP not allowing you to relay through their servers. Set your outgoing server to authenticate. Open the Account properties and on the server tab, check the option for the outgoing serverto authenticate. -- Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. After searching google.groups.com and finding not answer: Brogers@autotote.com <anonymous@discussions.microsoft.com> asked: | I ha...

Multiple id problem
Hello. I have an instance that I'd like some input-suggestions on if anyone would be so kind. We have a vendor table with each vendor ID being unique. One problem is, some vendor numbers have changed so there is a current # and an old #. Because of the multiple vendor #s the primary key is an auto #. The main dilemma I'm having with the design is that at least one vendor (maybe a few more but I'm not sure yet) has two old numbers and one new/current #. There are hundreds upon hundreds of vendors, and I'm wondering if a third vendor # field is the way to go. It see...

Management Studio
I have both a named instance of SQL Server 2008 and Express 2008 installed. When I try to connect with Management Studio, neither of those instances appears in the list of local servers. But I can see them in the list of network servers. In Local, I can see Integration Services only. Under the Network Servers tab, I see my server with the two database engines listed. In both cases, I have protocols Shared Memory, Named Pipes, and TCP/IP enabled, and VIA disabled. Is that the way it should be? I checked HideInstance in the Configuration Manager and it is set to No for both ins...

Multiple windows updating multiple rows simultaneously ?
I'm maintaining an application that currently allows entry of new records or updating exisiting records. What would be involved in modifiying the application to allow multiple windows to be open simultaneously. In other words, if the user is updating or creating a record in one window, he can leave that window and go update another record in another window or create a new record in another window, returning to the other windows afterwards. How complex would this be to handle? Thanks in advance for any help. Yes, I guess that's what it would amount to. "SteveM" wrote...

Delete/import a table from csv; wait for no users?
Hi guys, Could you please tell me if I should wait on a back end that no users are connected before re-importing a table? Basically I have csv files that I import into tables that are my libraries, or my hierarchy if you want. They have 1000 records max, but I was wondering if I can do that while users are on the db? They will mainly run queries and reports, so no record locks supposedly. For now I only trigger the import on the load event of the main form, if the ldb file is not present in the back end folder, but it means that only the first user who opens the db will be ...

how to import excel chart and table in visio
i have prepared diagrams, and illustrations in microsoft excel(using lines, rectangles etc). i want to import the table in visio and use the superior graphic abilities of visio. please advise on how to do this. Just copy and paste into visio. Then select the pasted image and ungroup with "Shape=>Grouping=>Ungroup". "S N" <uandme72@yahoo.com> a �crit dans le message de news:uk8mvPNEIHA.3548@TK2MSFTNGP06.phx.gbl... >i have prepared diagrams, and illustrations in microsoft excel(using lines, >rectangles etc). > i want to import the table in visio an...

How can I prevent OE closing Local Folders?
After 5-6 years, I am just returning to use OE 6. I have an extensive tree structure in my Local Folders with many sub folders that I wish to keep open even when I exit the program. With Courier, which I have used all this time, that is "normal behavior": any Folder that has not been closed by myself will continue to be open when I next start up the prog. OE6 at present, however, closes _everything_ when closing the prog. Is there any way in which I can prevent this - and being spared the rather frustrating and time consuming job of re-opening all needed folders...

Flags field in SOP10100 Table
What is the use of this field? Here is what my understanding of this field. Default is 0. When the Packing Slip is printed this field is incremented by 4 and when the picking ticket is printed this field is incremented by 8. If both are printed, the value in the field supposed to be 12. I have several orders that have other than 0,4,8,12. The other values in this field are 1,2,5,13 and 14. Please let me know what these values mean? Any help would be highly appreciated. Thanks, VJ I just figured this myself. If the Address is modified, the Flag is incremented. If the Comment Text is m...

MS Exchange forwarding from local accounts but not from external accounts
Hello.- I have Ms Exchange 2003. My domain is mycompany.com. and I created a DNS Record and a test account to another domain where the emails should be forward test@eu.myforward.com. I created the forward and if I send an email from my internal account me@mycompany.com to test@eu.myforward.com, the email goes thru fine. Now if I send an email from me@hotmail.com to test@mycompany.com which in Ms Exchange should forward to test@eu.myforward.com, the email comes back with: Reporting-MTA: dns;mycompany.com Received-From-MTA: dns;myforward.com Arrival-Date: Thu, 1 Feb 2007 13:36:16 -0600 Final-R...

vlookup from multiple sheets
i have data in 10 different sheets (Sheet 2 to Sheet11)with identical columns. i need to use the vlookup function in Sheet1 taking the range from column E to H from each sheet. Is there any tool whereby i can make te vookup function once for all sheets and need not to use it for 10 times. regards See http://www.ozgrid.com/VBA/VlookupAllSheets.htm -- Regards Dave Hawley www.ozgrid.com "Radhakant Panigrahi" <rkp.gen@gmail.com> wrote in message news:8A5B07E3-6E82-439D-96A6-FF556386DD32@microsoft.com... >i have data in 10 different sheets (Sheet 2 to ...