实现多语言/全球化在很大程度上.NET项目的最佳方法 [英] Best way to implement multi-language/globalization in large .NET project

查看:170
本文介绍了实现多语言/全球化在很大程度上.NET项目的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我会很快在一个大型的C#项目,并希望建立从一开始就支持​​多国语言。我有一个发挥作用的,可以得到它的工作使用的每种语言单独的资源文件,然后使用资源管理器来加载字符串。

I'll soon be working on a large c# project and would like to build in multi-language support from the start. I've had a play around and can get it working using a separate resource file for each language, then use a resource manager to load up the strings.

有没有,我可以考虑任何其他的好办法?

Are there any other good approaches that I could look into?

推荐答案

我实现了使用多种不同的方法看到的项目,每个人都有自己的优点和缺点。

I've seen projects implemented using a number of different approaches, each have their merits and drawbacks.

  • 在一个这样做是在配置文件(不是我最喜欢的)
  • 在一个做到了使用数据库 - 这个工作pretty的很好,但在你知道要保持什么是痛苦
  • 在一个使用的资源文件时,你是在暗示的方式,我不得不说这是我最喜欢的方式。
  • 在最基本的一个使用包含文件全串做到了 - 。丑

我说你所选择的资源的方法使得有很大的意义。这将是有趣的,看看别人的答案,也因为我常常在想,如果有这样搞的更好的方法。我见过无数的资源,所有指向利用资源的方法,包括<一href="http://stackoverflow.com/questions/119568/best-practice-to-make-a-multi-language-application-in-c-winforms">one这里的SO 。

I'd say the resource method you've chosen makes a lot of sense. It would be interesting to see other people's answers too as I often wonder if there's a better way of doing things like this. I've seen numerous resources that all point to the using resources method, including one right here on SO.

这篇关于实现多语言/全球化在很大程度上.NET项目的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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