How do you modify a string from a string table and/or how you use it ?
-
Please don't flame me (too much)... I am still a beginner. I have a dialog type MFC app with 1 string table. I added there strings for all controls and visual messages to the user. All these in order to make my app multi-language prepared. I thought this way: "I have default strings for everything. Then I try to load a language.ini file and overwrite every string in the string table with the ones that I read from the ini file. This way if the ini file is incomplete, I won't have textless controls or messages" My problem is that I don't know how to : a) Modify (IF POSSIBLE?) a string stored in a string table b) Use a string from the string table as a parameter to a function that requires one. For example for MessageBox. Thank you. PS: One way to do b) that I found is: CString test; test.LoadString(IDS_STOP); MessageBox(test,"abc",MB_OK); Only I fear that there is a simpler way.
-
Please don't flame me (too much)... I am still a beginner. I have a dialog type MFC app with 1 string table. I added there strings for all controls and visual messages to the user. All these in order to make my app multi-language prepared. I thought this way: "I have default strings for everything. Then I try to load a language.ini file and overwrite every string in the string table with the ones that I read from the ini file. This way if the ini file is incomplete, I won't have textless controls or messages" My problem is that I don't know how to : a) Modify (IF POSSIBLE?) a string stored in a string table b) Use a string from the string table as a parameter to a function that requires one. For example for MessageBox. Thank you. PS: One way to do b) that I found is: CString test; test.LoadString(IDS_STOP); MessageBox(test,"abc",MB_OK); Only I fear that there is a simpler way.
Paul DiLascia wrote such an article 8 or 10 years ago. I think it was called multi-lingual applications for MFC it was when VC5 first came out. Sorry I am no more help than this but I am sure he did such an article. Try his home page or microturd soft. http://www.dilascia.com/ cppqa@microsoft.com Best Wishes, ez_way
-
Please don't flame me (too much)... I am still a beginner. I have a dialog type MFC app with 1 string table. I added there strings for all controls and visual messages to the user. All these in order to make my app multi-language prepared. I thought this way: "I have default strings for everything. Then I try to load a language.ini file and overwrite every string in the string table with the ones that I read from the ini file. This way if the ini file is incomplete, I won't have textless controls or messages" My problem is that I don't know how to : a) Modify (IF POSSIBLE?) a string stored in a string table b) Use a string from the string table as a parameter to a function that requires one. For example for MessageBox. Thank you. PS: One way to do b) that I found is: CString test; test.LoadString(IDS_STOP); MessageBox(test,"abc",MB_OK); Only I fear that there is a simpler way.
On the MSDN CD is a book on internationalization (a newer version of the same book was released by Microsoft Press earlier this year). There are also articles at codeproject on internationalization. KEY WORD: internationalization Good luck! INTP
-
On the MSDN CD is a book on internationalization (a newer version of the same book was released by Microsoft Press earlier this year). There are also articles at codeproject on internationalization. KEY WORD: internationalization Good luck! INTP
-
Thank you! Seems to work... I found a lot of info. PS: What does INTP mean anyway? Couldn't find it in the acronym finder.
andreir23 wrote: What does INTP mean anyway? From: personalitypage.com "Logical, original, creative thinkers. Can become very excited about theories and ideas. Exceptionally capable and driven to turn theories into clear understandings. Highly value knowledge, competence and logic. Quiet and reserved, hard to get to know well. Individualistic, having no interest in leading or following others." INTP