添加全球资源语言后,如何为客户提供选择哪种语言的选项?
我在公司网站上的英语中添加了 3 种其他语言(fr、es-mx、de),它们都工作正常。我按照MSDN 创建本地化的演练进行操作。
我正在使用 Visual Studio 2010 / VB / dot-net 4.0,并且我的所有页面的顶行中已经有这样的内容:
<%@ Page Title="USS Products & Services" Language="VB" MasterPageFile="~/products/products.Master" AutoEventWireup="false"
CodeFile="default.aspx.vb" Inherits="default" culture="auto" meta:resourcekey="PageResource1" uiculture="auto" %>
我的 global_apps 目录中有 4 个全局资源 (.resx) 文件。但是,如果我不想只让浏览器检测他们的语言怎么办?我想让他们选择自己的语言。
我如何为客户提供 4 个标志之间的选项(每种语言 1 个)并让他们选择?或者也许是滚动站点地图类型的效果,他们可以将鼠标悬停在一种语言上并选择它?任何帮助将不胜感激!谢谢!
I have added 3 additional languages (fr, es-mx, de) to English in my company's website, and they're all working fine. I followed the MSDN walkthrough on creating localization.
I'm using Visual Studio 2010 / VB / dot-net 4.0 and I already have in my top line on all of my pages, this:
<%@ Page Title="USS Products & Services" Language="VB" MasterPageFile="~/products/products.Master" AutoEventWireup="false"
CodeFile="default.aspx.vb" Inherits="default" culture="auto" meta:resourcekey="PageResource1" uiculture="auto" %>
I have 4 global resource (.resx) files in my global_apps directory. But what if I don't want just the browser alone to detect their language? I want to give them the option of choosing their own language.
How do I give the client the option between 4 flags -- 1 for each language -- and let them choose? Or maybe a rollover sitemap type of effect, where they can mouse over a language and choose it? Any help would be appreciated! Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试这个简单的方法:
我已经在下拉列表中定义了语言,并有一个按钮选择
“立即”代码:
更新:抱歉,我忘记了覆盖关键字。现在包含它应该可以工作。
顺便说一句,你正在使用 VB,抱歉我没有看到这个。等效代码是:
Try this simple method:
I've defined the languages in a dropdownlist and have a button select
Now Code:
Update: Sorry I forgot the override keyword. Now included it should work.
By the way, you're using VB, sorry I'vent seen this. The equivalent code is: