By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,589 Members | 1,194 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,589 IT Pros & Developers. It's quick & easy.

Multilanguage Support

P: n/a
Hello All
I wanted to know that how can I build an application which takes arabic or
urdu input
I mean when I type something in my applications edit box it writes arabic.
please do let me know about a good tutorial regarding multilanguage support
in dot net applicaitons

Regards
Muhammad Aftab Alam
Nov 19 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Cor
Hello Aftab,
The walkthrough with multilanguage and vb.net looks if it's made by someone
who does not know much about languages.
But using more languages in vb.net is terrible easy.
You choose in the properties from the forms you use the language you want to
use.
Then you can enter the textfield from language and it comes in the resx
files.
When you change for another language, you can enter the other languages
control by control.
Arabic and Urdu is there too.
Cor
Nov 19 '05 #2

P: n/a
Kevin,
Add a .resx file to your project as an embedded resource. Then use the
System.Resources.ResourceManager object to retrieve the strings.

For each language you will need its own .resx.

strings.resx
strings.de.resx
strings.de-DE.resx

http://msdn.microsoft.com/library/de...nalization.asp

http://msdn.microsoft.com/library/de...gResources.asp

http://msdn.microsoft.com/library/de...mework_sdk.asp

Note: I don't have a working sample handy.

Hope this helps
Jay

"Kevin A." <ke*********@antwerpen.be> wrote in message
news:eQ**************@TK2MSFTNGP10.phx.gbl...
You choose in the properties from the forms you use the language you
want to
use.
Then you can enter the textfield from language and it comes in the resx
files.
When you change for another language, you can enter the other languages
control by control.
How about the literal strings in the code (in forms, classes...) ?
How can you manage them?
Kevin
"Cor" <no*@non.com> schreef in bericht
news:3f**********************@reader20.wxs.nl...
Hello Aftab,
The walkthrough with multilanguage and vb.net looks if it's made by

someone
who does not know much about languages.
But using more languages in vb.net is terrible easy.
You choose in the properties from the forms you use the language you

want to
use.
Then you can enter the textfield from language and it comes in the resx
files.
When you change for another language, you can enter the other languages
control by control.
Arabic and Urdu is there too.
Cor


Nov 19 '05 #3

P: n/a
Cor
Kevin,
Maybe the same for me with your message.
I do not know what for a user important language dependable string can be in
a class, while for a form I gave the answer.
Cor
Nov 19 '05 #4

P: n/a
> I do not know what for a user important language dependable string can be
in
a class, while for a form I gave the answer.
For example, a class can have a string that has to be displayed in a message
box,
or strings that have to replace the text already in a control.
Kevin
"Cor" <no*@non.com> schreef in bericht
news:3f***********************@reader20.wxs.nl... Kevin,
Maybe the same for me with your message.
I do not know what for a user important language dependable string can be in a class, while for a form I gave the answer.
Cor

Nov 20 '05 #5

P: n/a
Cor
Kevin,
That is the same as by instance changing a color from a control.
There are programmers who use the Ide to put a control on a form and there
are who write everything themselves.
We are talking about the first ones now.
The set the first color at design time with the Ide.
When they need to change a color in a control on runtime, they will use
code.
So what is the different with changing a text in a control. You have the
tools for it.
Cor
Nov 20 '05 #6

P: n/a
> So what is the different with changing a text in a control. You have the
tools for it.
Another example: you have a label that has to display a textual description
of
some speed. Depending on the speed it can display "Slow", "Little slow",
"Average", "Good", "Very good", "Perfect". The best solution to implement
this is to place the label on the form without any text, and assign the text
in
your code. The code should do something like this:

Select Case speed
Case Is < 10
label.Text = "Slow"
Case 11 To 25
label.Text = "Little slow"
Case 26 To 50
label.Text = "Average"
Case 51 To 80
label.Text = "Good"
Case 81 To 110
label.Text = "Very good"
Case Is > 110
label.Text = "Perfect"
End Select

To add multilanguage support to this application, you would need more than
just the IDE and the form's Language property.
You would have to create .resx files for each language/culture and access
them
programmaticly with a RecourceManager object, like Jay B. Harlow said in
this
thread.

Kevin
"Cor" <no*@non.com> schreef in bericht
news:3f***********************@reader21.wxs.nl... Kevin,
That is the same as by instance changing a color from a control.
There are programmers who use the Ide to put a control on a form and there
are who write everything themselves.
We are talking about the first ones now.
The set the first color at design time with the Ide.
When they need to change a color in a control on runtime, they will use
code.
So what is the different with changing a text in a control. You have the
tools for it.
Cor

Nov 20 '05 #7

P: n/a
Kevin,
A couple of more examples, that I intend on using in my project, are:
- Localized Descriptions for the property browser, where you inherit from
System.ComponentModel.DescriptionAttribute, localizing the text for display
in the Property window. CategoryAttribute has a similar ability.

- Localized 'categories', effectively a localized enum like class. Think of
enums on steroids ;-)

Even normal enums, you may want to localize if you display the text names to
a user.

Just a thought
Jay
"Kevin A." <ke*********@antwerpen.be> wrote in message
news:ec****************@TK2MSFTNGP12.phx.gbl...
So what is the different with changing a text in a control. You have the
tools for it.
Another example: you have a label that has to display a textual

description of
some speed. Depending on the speed it can display "Slow", "Little slow",
"Average", "Good", "Very good", "Perfect". The best solution to implement
this is to place the label on the form without any text, and assign the text in
your code. The code should do something like this:

Select Case speed
Case Is < 10
label.Text = "Slow"
Case 11 To 25
label.Text = "Little slow"
Case 26 To 50
label.Text = "Average"
Case 51 To 80
label.Text = "Good"
Case 81 To 110
label.Text = "Very good"
Case Is > 110
label.Text = "Perfect"
End Select

To add multilanguage support to this application, you would need more than
just the IDE and the form's Language property.
You would have to create .resx files for each language/culture and access
them
programmaticly with a RecourceManager object, like Jay B. Harlow said in
this
thread.

Kevin
"Cor" <no*@non.com> schreef in bericht
news:3f***********************@reader21.wxs.nl...
Kevin,
That is the same as by instance changing a color from a control.
There are programmers who use the Ide to put a control on a form and there are who write everything themselves.
We are talking about the first ones now.
The set the first color at design time with the Ide.
When they need to change a color in a control on runtime, they will use
code.
So what is the different with changing a text in a control. You have the
tools for it.
Cor


Nov 20 '05 #8

P: n/a
Cor
Kevin,
What is the difference with a colour
But the question was to help with a simple start. That I tried.
And I did not mention the resx editor, because when you start with that I
think that most people do like me, stop immediately.
I myself prefer a XML file. That I can reach with the xmldocument.
But that is maybe because I know that well and then it is easy to use.
The benefit from VB.net is that you are not obliged to do things in one way.
But beneath is an example from your question.
(And when you put that in XML it is really easy when you make the language
your first tag)
Cor

Your example can be:
Dim Language As InputLanguage = InputLanguage.DefaultInputLanguage
if language.substring(2) = "en" then
Select Case speed
Case Is < 10
label.Text = "Slow"
Case 11 To 25
label.Text = "Little slow"
Case 26 To 50
label.Text = "Average"
Case 51 To 80
label.Text = "Good"
Case 81 To 110
label.Text = "Very good"
Case Is > 110
label.Text = "Perfect"
End Select
Elseif Language.substrint(2)="kr" then
..........................
Nov 20 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.