如何建立多语言网站(英语和阿拉伯语)? [英] How to build multi language website (English and Arabic)?

查看:566
本文介绍了如何建立多语言网站(英语和阿拉伯语)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站,其内容是英文的。我想访问我的网站在两种语言(或更多),英语和阿拉伯语。

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?

推荐答案

取决于你想英语和阿拉伯语的翻译一下。

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

阿拉伯语为您从右到左写一个犹太人的语言,而英语是从左向右写的。这大部分的时间,意味着需要镜像您的应用程序的布局(菜单和放大器;导航,至少)。我会保持这个镜像尽可能在母版页。甚至更好,在CSS。然后,您可以有一个如果......否则分别引用左到右CSS或从右到左的CSS。

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.

此外,该文本可以很容易地放置在资源文件中。 DOTNET支持加载取决于你的 CurrentCultureUI 设置正确的资源文件。在这里你必须动态创建的字符串,我会使用的String.format(...)方法来替代动态的话。

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.

这篇关于如何建立多语言网站(英语和阿拉伯语)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆