Sebastian
Sebastian

Reputation: 1899

Is there a "portable" format string syntax for i18n?

Is there a format string syntax for i18n purposes which meets these requirements?

Upvotes: 2

Views: 172

Answers (1)

Jim DeLaHunt
Jim DeLaHunt

Reputation: 11415

I think the Formatting and Parsing features of the International Components for Unicode (ICU) might do the trick for you.

ICU has implementations in C/C++ and for Java, and others supply ICU bindings for 12 languages, from Python to Cobol. The ICU license allows "any person ... to deal in the Software without restriction....". The MessageFormat class should give you the named arguments you want. I haven't tried extending the ICU Formatting classes, but they do have a few abstract base classes you could start from.

Upvotes: 2

Related Questions