是否有最佳实践的应用程序国际化方法? [英] Is there a best-practice approach for internationalization of an application?

查看:43
本文介绍了是否有最佳实践的应用程序国际化方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们需要将我们的应用翻译成其他语言.这需要将我们可见控件的.text属性以及在应用程序中找到的其他文字重命名为我们需要翻译成的任何语言.

We need to have our apps be translated into other languages. This entails renaming the .text properties of our visible controls as well as other literals found within our apps to whatever language we need to translate into.

使用.resx文件可以轻松实现吗?我正在考虑创建一个主resx键/值列表,其中键将是控件/变量/常量等的完全限定名称,然后重构我们的应用程序以查看此文件以根据在以下位置找到的cultureinfo来获取其值.运行时?

Is this something that can easily be accomplished with .resx files? I was thinking of creating a master resx key/value list where the key would be the fully qualified name of the control/variable/constant etc. and then refactor our apps to look into this file to get their values based on the cultureinfo found at runtime?

有没有解决此问题的标准或更简单的方法?

Is there a standard or simpler approach to this problem?

推荐答案

有很多相关资源:

ASP.NET的MSDN指南应用程序.
用于WPF应用程序的代码项目示例.

MSDN guide for ASP.NET applications.
Code Project example for WPF applications.

您正确地认为可以通过使用.resx文件来实现.基本上,您会为每种希望支持的语言创建.resx文件,如果您根据语言环境(EN-US,DE-DE等)为其命名,则会自动获取该文件.

You are correct in thinking that this can be achieved through the use of .resx files. Basically you create .resx file for each language you wish to support and if you give it a name based on the locale (EN-US, DE-DE, etc) then it gets picked up automatically.

这篇关于是否有最佳实践的应用程序国际化方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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