全球化、本地化、国际化:添加语言(法语等)/asp.net 4.0/for dummies
我不是程序员,但我有一个用 MS Visual Web Developer 2010 Express(不是 Visual Studio)开发的小公司网站,所以我并不是完全无能。我想将法语和西班牙语添加到我的网站。例如,有些网站在 URL 后面有 ?lang=fr 或类似的内容。
因为我不是专业的硬核程序员,所以我需要具有用户友好的 GUI 的程序。与 Visual Studio 不同,Visual Web Developer 2010 没有用于添加语言的友好选项,也没有易于理解的 Web 教程。
所以我正在考虑将我的网站中的常规页面作为我的英文页面。然后,我可以创建 /FR/ 和 /ES/ 目录,然后将所有 aspx 和 aspx.vb 页面复制到各自的目录中并翻译它们。然后我会让最终用户在主页上选择单击“法语”或“西班牙语”。因此,点击 French 的最终用户将被定向到 domain/FR/default.aspx。
这种想法有错吗?有没有更简单、更容易的方法来完成 3 种语言?有没有一种我可能理解的看起来更专业的更专业的方式?
我可以安装 JQuery 插件。任何能帮助我实现这一目标的人都是天赐之物!感谢您花时间阅读本文,我真诚感谢您提供的任何和所有指导!
贾森·韦伯
I'm not a programmer, but I have a little company website that I developed with MS Visual Web Developer 2010 Express (not Visual Studio), so I'm not completely inept. I want to add French and Spanish languages to my website. So some websites have, for instance, ?lang=fr after the URL or something similar.
Because I'm not a professional hard-core programmer, I need programs with a user-friendly GUI. Unlike Visual Studio, Visual Web Developer 2010 doesn't have friendly options for adding languages, or easy-to-comprehend tutorials on the web.
So I was thinking about just having the regular pages in my website as my English pages. Then, I can make /FR/ and /ES/ directories, and just copy all the aspx and aspx.vb pages to their respective directories and translate them. Then I would give the end-user a choice on the homepage to click "French" or "Espanol". So an end-user who clicks French would be directed to domain/FR/default.aspx.
Is this thinking wrong? Is there a simpler, easier way to accomplish 3 languages? Is there a more PROFESSIONAL way that looks more professional that I might understand?
I can install JQuery plugins. Anyone who can help me achieve this is a Godsend! Thank you for your time in reading this, and I sincerely appreciate any and all guidance you can offer!
Jason Weber
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这种想法并没有错,但它确实有一个缺点:您对页面所做的每项更改都必须对所有副本重复(例如更改布局、修复错误或添加图像)。
大多数ASP.NET开发人员通常更喜欢做的就是保留一组页面,将所有可以翻译的内容放入所谓的资源文件中,然后让服务器根据用户的选择来选择语言内容。
MSDN 上的分步教程将帮助您使用 Visual Web Developer 将网站本地化为不同语言:
演练:使用 ASP.NET 资源进行本地化
在本教程中,浏览器指示用户的首选语言。因此它不使用单独的菜单来选择语言。我建议您首先熟悉 ASP.NET 资源和隐式本地化,因为这将引入很多新概念。
如果您以这种方式本地化了站点,则可以随时切换到显式本地化,同时仍然使用按照上述教程创建的资源。
This thinking is not wrong, but it does have a downside: every change you make to your pages you will have to repeat for all copies (e.g. changing the layout, fixing a bug or adding an image).
What most ASP.NET developers generally prefer to do, is to keep one set of pages, put all content that can be translated into so-called resource files and then let the server select the language content based on the user's choice.
This step-by-step tutorial on MSDN will help you to get your site localized in different languages using Visual Web Developer:
Walkthrough: Using Resources for Localization with ASP.NET
In this tutorial, the browser indicates the user's preferred language. So it doesn't use a separate menu to select the language. I suggest you first get familiar with ASP.NET resources and implicit localization, as this will introduce a lot of new concepts.
If you have localized your site this way, you can always switch to explicit localization, while still using the resources you have created by following the tutorial above.