How can I load French Stringtable
-
in older program, I used resource dll to load resource French. but now, I don't want to use dll. I want to use string table to support multilingual. use "String Tables" instead of creating a new set of Dialogs for each supported language. String Tables are to support multiple languages. Ex: I have created 2 stringtables (French and English): // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 // String Table // STRINGTABLE DISCARDABLE BEGIN IDS_CREATE "Create" END #endif // English (U.S.) resources // French (France) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA) #ifdef _WIN32 LANGUAGE LANG_FRENCH, SUBLANG_FRENCH #pragma code_page(1252) #endif //_WIN32 // String Table // STRINGTABLE DISCARDABLE BEGIN IDS_CREATE "Crée" END #endif // French (France) resources InitDialog function: CButton *pButtonName = (CButton *)GetDlgItem(IDC_CREATE); //create a button with ID: IDC_CREATE m_LoadString.LoadString(IDS_STRING104); //Load stringtable pButtonName->SetWindowText(m_LoadString); // Set button text When I compile, button name is Create (Load English Stringtable) Could you tell me how do I load button name is Crée (Load French Stringtable) Please show me a solution to solve it. Thanks a lot
Papais
-
in older program, I used resource dll to load resource French. but now, I don't want to use dll. I want to use string table to support multilingual. use "String Tables" instead of creating a new set of Dialogs for each supported language. String Tables are to support multiple languages. Ex: I have created 2 stringtables (French and English): // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 // String Table // STRINGTABLE DISCARDABLE BEGIN IDS_CREATE "Create" END #endif // English (U.S.) resources // French (France) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA) #ifdef _WIN32 LANGUAGE LANG_FRENCH, SUBLANG_FRENCH #pragma code_page(1252) #endif //_WIN32 // String Table // STRINGTABLE DISCARDABLE BEGIN IDS_CREATE "Crée" END #endif // French (France) resources InitDialog function: CButton *pButtonName = (CButton *)GetDlgItem(IDC_CREATE); //create a button with ID: IDC_CREATE m_LoadString.LoadString(IDS_STRING104); //Load stringtable pButtonName->SetWindowText(m_LoadString); // Set button text When I compile, button name is Create (Load English Stringtable) Could you tell me how do I load button name is Crée (Load French Stringtable) Please show me a solution to solve it. Thanks a lot
Papais
1. Please post code only when required. 2. Please use the <pre> </pre> tags to post code. 3. As a specific question. 4. Do not cross post. Use the ID of your French string with
m_LoadString.LoadString
instead ofIDS_STRING104
to load the French string.
Let us not listen to those who think we ought to be angry with our enemies, and who believe this to be great and manly. Nothing is so praiseworthy, nothing so clearly shows a great and noble soul, as clemency and readiness to forgive. - Marcus Tullius Cicero
-
in older program, I used resource dll to load resource French. but now, I don't want to use dll. I want to use string table to support multilingual. use "String Tables" instead of creating a new set of Dialogs for each supported language. String Tables are to support multiple languages. Ex: I have created 2 stringtables (French and English): // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 // String Table // STRINGTABLE DISCARDABLE BEGIN IDS_CREATE "Create" END #endif // English (U.S.) resources // French (France) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA) #ifdef _WIN32 LANGUAGE LANG_FRENCH, SUBLANG_FRENCH #pragma code_page(1252) #endif //_WIN32 // String Table // STRINGTABLE DISCARDABLE BEGIN IDS_CREATE "Crée" END #endif // French (France) resources InitDialog function: CButton *pButtonName = (CButton *)GetDlgItem(IDC_CREATE); //create a button with ID: IDC_CREATE m_LoadString.LoadString(IDS_STRING104); //Load stringtable pButtonName->SetWindowText(m_LoadString); // Set button text When I compile, button name is Create (Load English Stringtable) Could you tell me how do I load button name is Crée (Load French Stringtable) Please show me a solution to solve it. Thanks a lot
Papais