English 中文(简体)
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 and 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

最佳回答

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...

问题回答

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.

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





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签