Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How can I load French Stringtable

How can I load French Stringtable

Scheduled Pinned Locked Moved C / C++ / MFC
questionlearning
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dungpapai
    wrote on last edited by
    #1

    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

    R K 2 Replies Last reply
    0
    • D dungpapai

      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

      R Offline
      R Offline
      Rajesh R Subramanian
      wrote on last edited by
      #2

      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 of IDS_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

      1 Reply Last reply
      0
      • D dungpapai

        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

        K Offline
        K Offline
        KaRl
        wrote on last edited by
        #3

        Did you define AFX_TARG_FRA in your project settings?


        Society is composed of two great classes, those that have more dinners than appetite, and those who have more appetite than dinners Fold with us! ¤ flickr

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups