How to build multi language website (English and Arabic)?

…衆ロ難τιáo~ 提交于 2019-12-25 11:52:25

问题


I have a website, its content is in English. I want to access my website in two languages (or more) English and Arabic.

In this case, how do I build my website with these two languages?

Can anyone give an example for this or any reference?


回答1:


Depends on what you want to translate between English and Arabic.

Arabic is a semitic language which you write from right to left, while English is written from left to right. This most of the times means that the layout of your application needs to be mirrored (menu & navigation, at least). I'd keep this mirroring as much as possible in the master page. Or even better, in CSS. You could then have an 'if...else' which references respectively a left-to-right CSS or a right-to-left CSS.

Further, the text can be easily placed in a resource file. dotNET supports loading the right resource file depending on your CurrentCultureUI settings. Where you'd have dynamically created strings, I'd use string.Format(...) method to replace the dynamic words.

This is for the basics, you'd still have to decide what to do with more advanced 'custom' parts of the application.




回答2:


You can use a resource file with all the strings used by one site, and create one for English and one for Arabic.

Since your question is not very specific, you can look deeper and then ask again if you still have doubts to MSDN




回答3:


for a down-and-dirty solution, just install the wibiya widget and your users will be able to translate your page quite easily into any language you want - see http://www.wibiya.com for more

I can't vouch for the quality of the translations but it's a decent fallback option if you can't write the il8n code yourself...

hope it helps




回答4:


CodeProject

Use this. Not so much text as on MSDN - good for beginning. Not so hard, but alot of routine.



来源:https://stackoverflow.com/questions/2500938/how-to-build-multi-language-website-english-and-arabic

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!