locked
Different languages for text RRS feed

  • Question

  • Hello !

    I'm creating a vb.net application.

    but I need to set labels , button caption , Form's caption .... in different languages ( depending on what language the user choose ).

    I need a suggestions about how can I do that.

    Thank you !  

    Sunday, October 26, 2014 11:08 PM

Answers

All replies

  • Take the users choice and case on it for different languages.

    Renee


    "MODERN PROGRAMMING is deficient in elementary ways BECAUSE of problems INTRODUCED by MODERN PROGRAMMING." Me

    Monday, October 27, 2014 12:02 AM
  • But how and where can I save all the text translations ?
    Monday, October 27, 2014 1:40 AM
  • You'll to say much, much more.

    Renee


    "MODERN PROGRAMMING is deficient in elementary ways BECAUSE of problems INTRODUCED by MODERN PROGRAMMING." Me

    Monday, October 27, 2014 3:08 AM
  • But how and where can I save all the text translations ?

    Use Googles or Bings, or both in case one is down, translate API's if they have them then translate all your controls text accordingly.

    Which for some things may require you to measure strings in order to resize controls since a translation may be longer than the original text perhaps.

    Or translate all your text for all your controls to all known languages now and store all the translations in text files, line by line so each textfiles translations are all in the same order. Add each of those files as resources to your app. Then you have access to them if somebody selects a particular language.

    Or maybe even one delimited text file with all language names on the top line and all translations directly below.

    American English|British English|Russian|Mexican Spanish
    Dollar|Pound|рубль|Peso
    Tequila|Tequila|текила|Tequila
    Button1|Button1|кнопка1|Botón1


    La vida loca

    Monday, October 27, 2014 3:45 AM
  • But how and where can I save all the text translations ?

    Keywords here are "globalization", "localization" and "internationalization".

    Resources are usually used for storing strings in different languages.

    Some links to get you started:

    Localizing Windows Forms Resources
    http://msdn.microsoft.com/en-us/library/vstudio/yys3e2fd%28v=vs.100%29.aspx

    Managing Application Resources
    http://msdn.microsoft.com/en-us/library/vstudio/9za7fxc7%28v=vs.100%29.aspx

    Resources in Applications
    http://msdn.microsoft.com/en-us/library/vstudio/f45fce5x%28v=vs.100%29.aspx

    How to: Retrieve String Resources in Visual Basic
    http://msdn.microsoft.com/en-us/library/vstudio/d6z7a1dy%28v=vs.100%29.aspx

    How To Localize Your Application Using String Tables
    http://www.dev102.com/2008/10/20/how-to-localize-your-application-using-string-tables/

    Microsoft .NET Internationalization
    http://msdn.microsoft.com/en-us/goglobal/bb688096.aspx

    Globalization, Internationalization (I18N), and Localization using C# and .NET 2.0
    http://www.codeproject.com/Articles/43360/Globalization-Internationalization-I-N-and-Locali
    (C# not VB, and rather old (.NET 2) but gives a good overview of the process.)

    - Wayne

    • Proposed as answer by Carl Cai Monday, October 27, 2014 5:09 AM
    • Marked as answer by Carl Cai Monday, November 3, 2014 10:20 AM
    Monday, October 27, 2014 3:56 AM
  • If it is only what you wrote then you can use the language setting of forms, mostly persons want also give messages and than that procedure lacks flexibility.

    Here is the walkthrough, likewise Wayne wrote it is very old and I think it is seldom used (it needs also special install procedures).

    http://msdn.microsoft.com/en-us/library/y99d1cd3(v=vs.110).aspx

    Creating your own XML file will give you a lot more flexibility.

    Be aware to create a program in a different language needs a deep knowledge of languages, with an XML file you can use external knowledge while the resources (that is not the resource) method let that do by the programmer. 



    Success
    Cor

    • Marked as answer by Carl Cai Monday, November 3, 2014 10:20 AM
    Monday, October 27, 2014 8:23 AM