Hello peoplez,

I am writing an application in vb.net using a mysql database.
I need it to be multilingual.
I have not found much useful info on this so I thought I 'd go ahead and work it out myself.
I have started making a translation table in the mysql database consisting of the fields id, description, lang1, lang2
I would then use the proper language column according to the configuration. Not too hard upto this point.
I was wondering if there is a good reason NOT to use the database, but in stead use plain text files. A good reason would be speed for example.
anyone any thoughts on this?

Regards,

v.

Windows forms allow to direct translate the texts on your form using the form designer and setting the Localizable option to true. Then on the default language set the texts you want to appear when no language was selected.
You can select as many languages you need. For each language you need to translate all the texts in the form. Also, you can change some appareances due to language requirements.

This thechnique uses resource files from Visual Studio, one for each language.

Then, on the form load (or activate) event, you can use a resource manager for the current assembly to load the appropiate texts, depending on the default culture info (see the system globalization), or the one selected by the user.

If you are talking about the multilanguage texts for a database item like a product description, then you can add a unique identifier to each item and create a table with the unique identifier and cultureinfo name as keys, and the translation as the text.

Searching using the default (or the selected by the user) culture info and the unikie identifier, you can find the text to show. Have in mind to always have almost a default text when no translation is provided.

Hope this helps.

Hello peoplez,

I am writing an application in vb.net using a mysql database.
I need it to be multilingual.
I have not found much useful info on this so I thought I 'd go ahead and work it out myself.
I have started making a translation table in the mysql database consisting of the fields id, description, lang1, lang2
I would then use the proper language column according to the configuration. Not too hard upto this point.
I was wondering if there is a good reason NOT to use the database, but in stead use plain text files. A good reason would be speed for example.
anyone any thoughts on this?

Regards,

v.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.