|
-
Jun 27th, 2007, 12:04 AM
#1
Thread Starter
Junior Member
regional and language Problem in vb
i have a problem with Regional and language problem.Because when i change the regional language English(united states) to any other language like German(Germany),french etc the application is not running in proper way.
Problems are as follows:-
1)it shows froblem in loading loading log details of form
2)result form dose not show any the output
example
command1_click
if Combo1.text="January" then
text1.text="hello"
end if
insist of showing the out put hello it shows null valu(blank in the textbox)
if i change again the language to english it shos the proper result
please help me to overcome the problem thank you in avance
please send the solution as soon as possible
-
Jun 27th, 2007, 01:51 AM
#2
Re: regional and language Problem in vb
You need to use a resource file to hold every string literal in your application. Whenever you use a string literal, you need to do a lookup in the resource file, grabbing the string for whichever language you're using.
-
Jun 27th, 2007, 02:03 AM
#3
Re: regional and language Problem in vb
In order to have all desciptions/lables etc.. in the correct language, the use of a resource file (like Ellis Dee staed) is the way to go, however the problem discribed sounds different (at least from what I could understand).
The code you have posted should always show "hello" in the text1.text! However is this code line really used? If you have changed the language, what does the combobox show at selectable items ("January" or "Januar"). Your check will only be true if the item in the combobox does show exact this string ("January").
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button
Wait, I'm too old to hurry!
-
Jun 27th, 2007, 03:01 AM
#4
Re: regional and language Problem in vb
 Originally Posted by opus
The code you have posted should always show "hello" in the text1.text! However is this code line really used? If you have changed the language, what does the combobox show at selectable items ("January" or "Januar"). Your check will only be true if the item in the combobox does show exact this string ("January").
Those literals also need to be looked up in the resource file.
One quick cheat is to use the Format() function to return regional day and month names. (At least I assume it is locale-aware; I could be wrong.)
-
Jun 27th, 2007, 03:07 AM
#5
Re: regional and language Problem in vb
Correct, all strings (if they are .caption of a button or whatsoever) have to be looked up in order to show them correct.
However if somebody uses the code like above:
Code:
command1_click
if Combo1.text="January" then
text1.text="hello"
end if
your regional stting could be anything, the text1.text should always show "hello" and the check in the if statement is always against "January", if I'm not totaly mistaken!
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button
Wait, I'm too old to hurry!
-
Jun 27th, 2007, 08:03 AM
#6
Re: regional and language Problem in vb
This sounds familiar... same question yesterday (with more code supplied, and different solutions).
-
Jun 27th, 2007, 11:53 PM
#7
Thread Starter
Junior Member
Re: regional and language Problem in vb
thank you for reply opus
on form load
i used
for i=1 to 12
combo1.additem Monthname(i)
next
it shows "januar" when i use german language
if i use this code]
command1_click
if Combo1.text="January" then
text1.text="hello"
end if
how can i over come the problem
thats why it shows blank in text box.thank you again in advance
-
Jun 28th, 2007, 01:37 AM
#8
Re: regional and language Problem in vb
Use the same technique as in the form_load event, don't assign a hardcoded string, use MonthName(1) instead .
Code:
command1_click
if Combo1.text=MonthName(1) then
text1.text="hello"
end if
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button
Wait, I'm too old to hurry!
-
Jul 11th, 2007, 03:20 AM
#9
Thread Starter
Junior Member
Re: regional and language Problem in vb
you reply solved my problem
thank you thank u thank u
im am giving u 10 out of 9 bye
-
Jul 11th, 2007, 07:43 AM
#10
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|