需要一些帮助来理解共享点本地化
让我们尝试保持简单。
给定一个 SharePoint 网站(英语)和一个功能(使用资源文件本地化)为英语(默认)和捷克语(但可以是任何语言)。
为什么我需要安装捷克语网站集才能使捷克语本地化字符串发挥作用。我认为本地化是从用户上下文开始的,IE:基于当前登录的用户区域设置,这些设置会渗透到浏览器?
Lets try keep this simple.
Given a SharePoint site (english) and a feature (localized with resource files) to English (default) and Czech (but could be any language).
Why do I need to install a Czech Site Collection to get the Czech localization strings to work. I thought localization worked from user context, IE: based on the currently logged on users regional settings which trickle through to the browser?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
功能并不是真正针对“最终用户”的,而是仅供网站管理员推出的。因此,与功能本身相关的本地化文件(即描述、标题等)以网站集的语言显示。您创建的任何控件和 aspx 页面等都可以针对当前用户浏览器的显示语言进行本地化,只需使用正常的 ASP.NET 方式即可。为了能够让您的网站真正听取用户的语言首选项,您还需要通过将全球化设置为自动来更改 Web 应用程序的 web.config,如下所示:
任何 aspx 页面都需要具有
Culture="auto
。<%@ Page
指令中的“ UICulture="auto"以上内容是 Hristo Yankov 的 优秀文章的“摘录” 。
A feature is not really meant for "end users", but for site admins to roll out only. So localization files pertaining to the feature itself (i.e. description, title etc.) are shown in the language of the site collection. Any controls and aspx pages etc. you create though could be localized for the display language of the current user's browser, just use the normal ASP.NET way of doing this. To be able to have your site actually listen to the user's language preference you need to change the web.config of the web app also though by setting the globalization to auto like so:
Any aspx page needs to have
Culture="auto" UICulture="auto"
in the<%@ Page
directive.Al off the above is an "excerpt" from Hristo Yankov's excellent article.
我相信功能 LCID 将与网站集的 RootWeb.Locale.LCID 相关。
也就是说,您可能需要编写自己的逻辑来获取文化信息并显示各自的资源文件。
I believe a feature LCID will be related to the RootWeb.Locale.LCID of the Site Collection.
That said, you probably need to code your own logic to grab culture info and display your respective resource file.