Suggestion to do a multilanguage project
-
Hai, Everyone I developed a application for entering datas for a company now i want to add multilingual support for the application,i readed about the Form localization but it is not a practical way. Iam Planning to take translations from my database table. in future admin can add more languages. My Application have a login form. i created a combobox there named language. when a my application start the login page will display. my problem is how can i change language for all form eg:(when a user change combox index i need to change all form's language) I thing you understand what is my problem is. Can anyone Please Help me To Do it?
Arunkumar.T
-
Hai, Everyone I developed a application for entering datas for a company now i want to add multilingual support for the application,i readed about the Form localization but it is not a practical way. Iam Planning to take translations from my database table. in future admin can add more languages. My Application have a login form. i created a combobox there named language. when a my application start the login page will display. my problem is how can i change language for all form eg:(when a user change combox index i need to change all form's language) I thing you understand what is my problem is. Can anyone Please Help me To Do it?
Arunkumar.T
Some way or another your are going to end up storing a collections of string elements (to be mapped onto your GUI) that relate to many language versions. EnterButton => English:"Enter",Spanish:... Localization I think is the only way you can achieve such effect... Maybe look at http://ondotnet.com/pub/a/dotnet/2002/09/30/manager.html[^], a four part series that could help?
-
Hai, Everyone I developed a application for entering datas for a company now i want to add multilingual support for the application,i readed about the Form localization but it is not a practical way. Iam Planning to take translations from my database table. in future admin can add more languages. My Application have a login form. i created a combobox there named language. when a my application start the login page will display. my problem is how can i change language for all form eg:(when a user change combox index i need to change all form's language) I thing you understand what is my problem is. Can anyone Please Help me To Do it?
Arunkumar.T
Since you want the values to be retrieved from a database rather than using a resource file you will need to method to map the display values to the contents of the database. You can do this by either using the LCID as a key to lookup values or by creating a separate database table for each language and changing the connection string based on the LCID. I prefer the former method.
No comment
-
Hai, Everyone I developed a application for entering datas for a company now i want to add multilingual support for the application,i readed about the Form localization but it is not a practical way. Iam Planning to take translations from my database table. in future admin can add more languages. My Application have a login form. i created a combobox there named language. when a my application start the login page will display. my problem is how can i change language for all form eg:(when a user change combox index i need to change all form's language) I thing you understand what is my problem is. Can anyone Please Help me To Do it?
Arunkumar.T
You can set the Current UI Culture of a thread by
Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("de-DE");
Note that a new thread inherits the UI Culture from Windows, not from the parent thread; i.e. you have to set it again. For forms which are already displayed, you'll need an event and an event handler for a "UICultureChanged" event.
-
You can set the Current UI Culture of a thread by
Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("de-DE");
Note that a new thread inherits the UI Culture from Windows, not from the parent thread; i.e. you have to set it again. For forms which are already displayed, you'll need an event and an event handler for a "UICultureChanged" event.
Create a interface ITranslateable with one method : void Translate(). Let each Form implement the interface. When a form is loaded (load event) you call the interface method. Also when the language is changed you call the interface method for each active form (keep a reference!). In the implementation of the method you call a database search for each control that needs translation: ie comboBox2.Text = Database.getTranslation("Form3.comboBox2"). In the database you have a table with all gui-objects (ie. "Form3.comboBox2"), and a table with an entry for each gui-object/language combination. Also when you get data from the database (to fill a grid or so) the data must be translated? It can be done in the same table (ie "tablename.objectname").
-
Hai, Everyone I developed a application for entering datas for a company now i want to add multilingual support for the application,i readed about the Form localization but it is not a practical way. Iam Planning to take translations from my database table. in future admin can add more languages. My Application have a login form. i created a combobox there named language. when a my application start the login page will display. my problem is how can i change language for all form eg:(when a user change combox index i need to change all form's language) I thing you understand what is my problem is. Can anyone Please Help me To Do it?
Arunkumar.T
Arunkumar.Koloth wrote:
Iam Planning to take translations from my database table. in future admin can add more languages.
Internationalization is NOT only about language transalation. You need to research the issues involved first and AFTER that then consider how to design/implement it.