How to create and maintain a multi-language project?
Asked Answered
W

3

7

I am planning to make a multi-language application in C# and was wondering what is the best way to handle the follow:

  • The container for the languages;
  • Best approaches to read/change once initiated/requested;
  • As the program grows so does the the text for each language what do you usually do and recommend as best practice;
  • What sort of problems have you encountered while doing such type of applications;

Thanks for any advice, replies, etc.

I would really appreciate links and sample code if it's not too much trouble (not required, only if you have the time and can).

Wallace answered 12/7, 2010 at 15:19 Comment(3)
a downvote without a comment is just like a person that votes without meaning. Come forth and tell me your reason at least.Wallace
Wasn't me, but I think the question is too generic. Maybe split into: how to create a multi-language project? How to store data (giving more details about the domain), how to handle i18n? etc.Ambroseambrosi
Thanks for the input Mau i will rework it now... i am very unsure on how to re-write it toughtWallace
E
2

I'd say that the standard way to localize a C# app is using resources and satellite assemblies. Here are some articles about this:

Creating and Implementing Satellite Assemblies
Localization Like the Pros
MSDN: Localizing Applications

Equator answered 12/7, 2010 at 15:36 Comment(1)
Thanks for the answer ho1 i will take a look at it, hope the question looks better now.Wallace
E
1

To handle languages the best way is to store strings in a resource file. You can release additional languages with satellite assemblies. You will find a lot of information about globalization and localization with C#: for example in MSDN

If you are planning to store much data, i would suggest SQL Compact + NHibernate. XML is very slow especially with C#.

Eng answered 12/7, 2010 at 15:37 Comment(1)
Thanks, I am not sure if it will be that much data at the start but i am sure it will grow over time with new features...Wallace
C
1

Like everyone said, using a resource file is good way to store the localization data. Starting from that point you can find some approaches, the most common approaches could be using satellite assembly or using a file based resource manager.

On my personal opinion, I think satellite assembly helps your project to be more flexible and obviously helps with extensibility (I think many comercial software uses this approach).

On the next link you can find information about the two approaches.

.NET - Localization using Resource file

The next link is a really good article aboud localization and base concepts.

Internationalization & Localization

Hope it helps.

Cavan answered 12/7, 2010 at 16:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.