Paul
Paul

Reputation: 1875

Localization strategy to share translations (string resources) between projects in C# and Java

There are different projects developed in C# and Java.

Some of C# projects are platforms which provide API for other C# and Java projects to use.

It is desirable to minimize and simplify the l10n strategy for them all together at the level of enterprise.

I am thinking about using some sort of common xml from which it will be possible to generate C# resource strings in format we choose for C# development (both back-end and ASP.Net front-end) and specific string resources for Java projects.

The idea is for each project to be able to have a base set of strings available for all projects, as well as an ability for each project to add additional strings resources.

The goal is to standardize the format which will be given to translators and be able to ensure that strings are not duplicated among the projects.

Also question is about the synchronization of new/deleted and updated entries among the projects.

Have you faced such challenge before? What l10n and i18n strategy have you chosen?

Upvotes: 0

Views: 880

Answers (3)

thmayr
thmayr

Reputation: 57

To internationalize applications I implemented a Message Compiler, which creates the resource bundle files and constant definitions as Java enums or static final strings for the keys from one single source file. So the constants can be used in the Java source code, which is a much safer way than to use plain strings. The message compiler cannot only be used for Java. It creates also resource files and constants for Objective-C or Swift and can be extended for other programming environments. So you may add output processors for C#.

Upvotes: 1

Aravind Yarram
Aravind Yarram

Reputation: 80186

If you want to share the localized texts across multiple computing platforms then there is no better solution than using the DB backed bundles. XLIFF is the open standard designed to share localization related resources across various parties.

The XLIFF format aims to:

  • Separate localizable text from formatting.
  • Enable multiple tools to work on source strings and add to the data about the string.
  • Store information that is helpful in supporting a localization process.

Find some commercial and open source tools supporting this format in the wiki here.

Upvotes: 1

sorin
sorin

Reputation: 170498

If possible I would try to use gettext format, otherwise .properties files can easily be loaded in any language.

Upvotes: 1

Related Questions