开发者

HOW TO MAKE localization?

I have a question about localization how can i do localization lets say that i have a dropdown list that holds the available languages: English,french and arabic an开发者_JAVA技巧d I have a label which get it says "good morning",so i want to change the lang. according to selected lang. in drop down list so when the user chooses french label will say "bonjour" and when the user slect arabic the label will hold "صباح الخير" AND MOVE IT FROM THE LEFT OF THE PAGE TO THE RIGHT BECAUSE ARABIC IS WRITTEN FROM RIGHT TO LEFT ,, ANY HELP WILL BE HIGHLY APPERCAITED THNX IN ADVACE


In short, localization in ASP.NET is fully supported using resource files, e.g. files containing strings, images and other resources for each user interface language. They're named after the culture, for example MyResources.en-US.resx or MyCulture.fr-FR.resx.

The only thing that is a bit tricky is handling LTR and RTL languages and, as far as I know, must be done "manually", via code, or via CSS.

You might want to check some documentation on MSDN.


Have you ever saw the Localization video tutorials from ASP.NET website?

How Do I: Create a Multi-Lingual Site with Localization?

and

How Do I: Localize an ASP.NET AJAX Application?

They are great to get you started...


you can create an http module that is going to read the html from the output stream and translate it,use RegEx and make sure not to translate html tags and JavaScript


there is also the asp.net standard (built-in) way, with resource files, just right click your project and click add items resource file, you must create a resource file for each language like for example: MUI.resx (that's the neutral one), MUI.fr.resx, MUI.es.resx, and you are going to use them in the web pages like this: MUI.keyword , that's if you are going to have one resx per language for all pages, you could also have one resx per language per webform. And the current language is in the System.Threading.CurrentThread.CurrentUICulture google it a little bit you will find more, at least now you know what to look for

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜