|
-
Apr 1st, 2003, 01:26 PM
#1
Thread Starter
Addicted Member
Multilingual application?
I need to write multilingual application (two languages). That's means labels, buttons and other objects on forms display in language which user can select. Generally, how to do that?
p.s. this n-tier (3-tier) application with central database on remote machine
regards
-
Apr 1st, 2003, 04:10 PM
#2
Sleep mode
Search General VB Questions Forum for a lot of links I posted about Application Globalization . It should help you .
-
Apr 1st, 2003, 09:18 PM
#3
If I were doing this I would store all of my strings that go on buttons, labels and menus in a database or XML file.
Then when they want to switch languages load the string from the database/XML.
Hope this helps,
-
Apr 2nd, 2003, 07:20 AM
#4
Thread Starter
Addicted Member
In that approach, I must on every form in load event read label(s).text, button(s).text ... from database or xml. I'm wondering is that poor (slow) solution?
regards
-
Apr 2nd, 2003, 09:08 AM
#5
Well you could load all of the appropriate language information into memory to start, and only hit the database/XML when the application loads, or when they switch languages.
-
Apr 2nd, 2003, 10:11 AM
#6
Frenzied Member
-
Apr 2nd, 2003, 10:19 AM
#7
This is exactly why VB has RESOURCE files.... look into that on MSDN... I know there is a tutorial on there on how to "globalize" an app.
-
Apr 2nd, 2003, 12:25 PM
#8
Sleep mode
Originally posted by techgnome
This is exactly why VB has RESOURCE files.... look into that on MSDN... I know there is a tutorial on there on how to "globalize" an app.
If you store all language inof in resource file , then you have to recompile your proj not like XML or DB file . So better you go for either XML or DB .
-
Apr 2nd, 2003, 02:53 PM
#9
Frenzied Member
-
Apr 2nd, 2003, 02:56 PM
#10
Sleep mode
Well , I wasn't talking about .NET . That was in VB6 as I can remember.
-
Apr 3rd, 2003, 09:05 AM
#11
Read "Developing International Software" by Dr. International from Microsoft Press (ISBN 0-7356-1583-7).
Each form in your project has a Localizable property. Set this to true and VB will create a resource file (e.g. Form1.resx) for your form. Copy these forms and rename them as (e.g. From1.fr.resx). The "fr" in this example is French, you use "ja" for Japanese and so on. Edit Form1.fr.resx and translate the .Text properties. Recompile your program and run it on a French PC - Form1 will pick up the translations from Form1.fr.resx.
You can also force a change of Culture (e.g. language) from code.
This world is not my home. I'm just passing through.
-
Apr 3rd, 2003, 12:20 PM
#12
Sleep mode
Originally posted by trisuglow
Read "Developing International Software" by Dr. International from Microsoft Press (ISBN 0-7356-1583-7).
Each form in your project has a Localizable property. Set this to true and VB will create a resource file (e.g. Form1.resx) for your form. Copy these forms and rename them as (e.g. From1.fr.resx). The "fr" in this example is French, you use "ja" for Japanese and so on. Edit Form1.fr.resx and translate the .Text properties. Recompile your program and run it on a French PC - Form1 will pick up the translations from Form1.fr.resx.
You can also force a change of Culture (e.g. language) from code.
This means , if you want to release another version then you have to add the changes and recompile the whole proj . am I right ?
-
Apr 4th, 2003, 02:39 AM
#13
Yes,
I believe that if you want to add a new (spoken) language to your application you will have to provide appropriate .resx files and recompile.
I believe that it is possible to write code to look for .resx files at run time and load them in, but I imagine this would be quite hard work and you wouldn't be taking advantage of the built-in facilities on offer. I wouldn't know how to start on this...
This world is not my home. I'm just passing through.
-
Apr 4th, 2003, 02:44 AM
#14
Sleep mode
Dude , use XML or database . The only thing you need is to add some translated lablel captions and that's it !
-
Sep 28th, 2009, 11:34 AM
#15
New Member
Re: Multilingual application?
Keep in mind that translating labels will not resize your controls.
What you can do is
1. Set the localizable property in the form you are working on to TRUE and change the language from default to the language you are translating it to.
2.After you've selected the language you may then change the text and size and anything else you need to change.
3. When you are done with your changes set the localizable property on the form back to default.
This will automatically generate the resource files for the form in each language you've worked with in your form (no need to manually rename the forms). This is lighter in the end, since the assemblies will only contain the localizable information.
Your application will be loaded in the correct language according to the user's OS settings.
Hope this helps
-
Sep 28th, 2009, 12:06 PM
#16
Fanatic Member
Re: Multilingual application?
Gabe, get back to work and stop resurrecting dead threads :P
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
|