Multi Language in Dont Net
-
hi, There two ways for multilanguage that i've studied so far. 1. Resoure files 2. XML File Which is the best and why? :confused:
Syed Shahid Hussain
-
hi, There two ways for multilanguage that i've studied so far. 1. Resoure files 2. XML File Which is the best and why? :confused:
Syed Shahid Hussain
Resource file is also a XML file..:) Use resource file, it's easy, just write your text in resource file, vs will be create automatically the class for that and you can use it. For example : Greeting = "Hello" Then in your app, you can use it using Resource.Greeting, then you get automatically the text behind it.
-
Resource file is also a XML file..:) Use resource file, it's easy, just write your text in resource file, vs will be create automatically the class for that and you can use it. For example : Greeting = "Hello" Then in your app, you can use it using Resource.Greeting, then you get automatically the text behind it.
Thanks but how to set the label text from resource. Do v need to set the captions of all labels at the loading of the form or there is any other technique.
Syed Shahid Hussain
-
Thanks but how to set the label text from resource. Do v need to set the captions of all labels at the loading of the form or there is any other technique.
Syed Shahid Hussain
-
Thanks but how to set the label text from resource. Do v need to set the captions of all labels at the loading of the form or there is any other technique.
Syed Shahid Hussain
If you have a form you need localized, in the designer view, set its Localizable property to be true, then set it's Language property to be whatever language you are localizing. This essentialy creates a second copy of the form, in which you can change the text on all the controls, resize them to fit different length text, while still allowing you to switch back to the default language without the resizes and the text changes. All of you work will automatically get stored in a resex file.
-
For example, you just created a recource file, named Resource.resx Then, to set the label, use : this.label1.Text = Resource.MyText;
but it would not be a lengthy process ???
Syed Shahid Hussain
-
If you have a form you need localized, in the designer view, set its Localizable property to be true, then set it's Language property to be whatever language you are localizing. This essentialy creates a second copy of the form, in which you can change the text on all the controls, resize them to fit different length text, while still allowing you to switch back to the default language without the resizes and the text changes. All of you work will automatically get stored in a resex file.
Thanks
Syed Shahid Hussain