Silverlight 3 本地化配置

发布于 2024-08-09 15:45:03 字数 176 浏览 5 评论 0原文

我想知道如何配置我的 Silverlight 应用程序,以便能够更改当前线程的 UICulture,而无需重新编译应用程序。

如果我在 app.xaml 中设置当前线程区域性,则每次都需要重新编译以更改区域性。如果我添加应用程序设置,如何在客户端上检索该信息以便能够更改当前线程区域性信息?

有什么想法吗?

I would like to know how I can configure my Silverlight application to be able to change the UICulture of the current thread without having to recompile the application.

If I set the current thread culture in the app.xaml, I need to recompile each time to change the culture. If I add an Application Settings, how can I retrieve that information on the client to be able to change the current thread culture info?

any ideas ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

谁的新欢旧爱 2024-08-16 15:45:03

您可以从托管 silverlight 应用程序的 html 或 aspx 文件中选择区域性。这不需要重新编译您的应用程序,但需要刷新网页。此方法依赖于文化名称列表。希望这有帮助。

前任:

<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
      <param name="source" value="ClientBin/SL_Loc_Sample2.xap"/>
      <param name="onError" value="onSilverlightError" />
      <param name="background" value="white" />
      <param name="minRuntimeVersion" value="3.0.40624.0" />
      <param name="autoUpgrade" value="true" />
      <param name="culture" value="de" /> 
      <param name="uiculture" value="de" />
      <!--<param name="culture" value="fr" /> 
      <param name="uiculture" value="fr" />-->
      <!--<param name="culture" value="ja" /> 
      <param name="uiculture" value="ja" />-->
      <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40624.0" style="text-decoration:none">
          <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style:none"/>
      </a>
    </object>

You can the culture from your html or aspx file that hosts the silverlight application. This would not require a recompile of your application but would require a refresh of the web page. This approach is dependent on the Culture Names list. Hope this helps.

Ex:

<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
      <param name="source" value="ClientBin/SL_Loc_Sample2.xap"/>
      <param name="onError" value="onSilverlightError" />
      <param name="background" value="white" />
      <param name="minRuntimeVersion" value="3.0.40624.0" />
      <param name="autoUpgrade" value="true" />
      <param name="culture" value="de" /> 
      <param name="uiculture" value="de" />
      <!--<param name="culture" value="fr" /> 
      <param name="uiculture" value="fr" />-->
      <!--<param name="culture" value="ja" /> 
      <param name="uiculture" value="ja" />-->
      <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40624.0" style="text-decoration:none">
          <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style:none"/>
      </a>
    </object>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文