CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 25 of 25
  1. #16
    Join Date
    Nov 2011
    Location
    India
    Posts
    333

    Re: wstring Conversion

    Quote Originally Posted by Arjay View Post
    What class is m_pLanguage? How is its GetString method implemented?
    m_pLanguage is a instance of CLanguage class.

    I want to add multiple language support to my application.

    i can use LoadString() function to retrieve string from local resource table.

    But how can i use the same function for Dll resource table data retrieve process?
    Attached Files Attached Files
    Regards,

    SaraswathiSrinath

  2. #17
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: wstring Conversion

    You have created your Language module as the ANSI/MBCS. Therefore it won't work properly on every PC for every language on every locale.
    Only on the PC where the desired language (Korean in your case) was chosen as the language for non-Unicode programs.
    Victor Nijegorodov

  3. #18
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: wstring Conversion

    Additional Info:
    this thread
    Google
    Victor Nijegorodov

  4. #19
    Join Date
    Nov 2011
    Location
    India
    Posts
    333

    Re: wstring Conversion

    Quote Originally Posted by VictorN View Post
    Additional Info:
    this thread
    Google
    Ok thank you, i will check.
    Regards,

    SaraswathiSrinath

  5. #20
    Join Date
    Nov 2011
    Location
    India
    Posts
    333

    Re: wstring Conversion

    Hi,

    I have one more doubt.

    If we add a google translator in website, it will change the website content depends on the selected input by user.

    Like that, any thing available in MFC?

    Example, if i create a font and added for all controls like text/edit box, is it take care for the translation?

    Be-cos, i want 5 languages to show in my application (English, Hindi, Tamil, Chinese/Korean].

    Kindly share your experience.
    Regards,

    SaraswathiSrinath

  6. #21
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: wstring Conversion

    Sorry! I never used it and have no idea how it works.
    I guess you should look for the google translator documentation.
    Victor Nijegorodov

  7. #22
    Join Date
    Nov 2011
    Location
    India
    Posts
    333

    Re: wstring Conversion

    Thank you
    Regards,

    SaraswathiSrinath

  8. #23
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: wstring Conversion

    Since you are using MFC forget using wstring, instead use CString. Also there is a complete infrastructure for localizing an MFC app already built into MFC which uses resource dlls. You need to learn this, how to build resource dlls, how to switch languages, etc. Search bing or google for "How to localize an mfc application".

  9. #24
    Join Date
    Nov 2011
    Location
    India
    Posts
    333

    Re: wstring Conversion

    Quote Originally Posted by Arjay View Post
    Since you are using MFC forget using wstring, instead use CString. Also there is a complete infrastructure for localizing an MFC app already built into MFC which uses resource dlls. You need to learn this, how to build resource dlls, how to switch languages, etc. Search bing or google for "How to localize an mfc application".
    No words to say. Its working. Finally read from dll resouce string
    Code:
    HMODULE cargaDLL;
    cargaDLL =  LoadLibrary(L"C:\\lng\\Chinese.dll"); 
    CString re  = 	LoadStringFromDLL(cargaDLL, IDS_EXAMPLE);			
    m_lblExample.SetWindowText(re);
    Thank you
    Regards,

    SaraswathiSrinath

  10. #25
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: wstring Conversion

    Quote Originally Posted by saraswathisrinath View Post
    No words to say. Its working. Finally read from dll resouce string
    Code:
    HMODULE cargaDLL;
    cargaDLL =  LoadLibrary(L"C:\\lng\\Chinese.dll"); 
    CString re  = 	LoadStringFromDLL(cargaDLL, IDS_EXAMPLE);			
    m_lblExample.SetWindowText(re);
    Thank you
    Victor Nijegorodov

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured