views:

132

answers:

6

Hi,

When developing in .Net, the framwork provides resx files as the standard way of storing localised resources (e.g. tranlsations of UI text).

I would like to know if there is a standard format for this in other development platforms (e.g. Java, RoR, etc.) and what that format is.

Thank you!

Please limit each answer to one development technology (e.g Java/C++/PHP etc.)

+1  A: 

See http://www.freebsd.org/doc/en/books/developers-handbook/posix-nls.html

There is a standard, called POSIX, that applies to just about every other non-Windows operating system.

See http://www.php.net/manual/en/book.intl.php for the PHP-specific implementation of internationalization.

S.Lott
Thanks. I haven't looked into this in detail, but at first glance this seems a bit C specific to me. I'm not convince for instance that a PHP developer would use this.
UpTheCreek
@Sosh: Why do you mention PHP? Is that part of your question? If it's part of your question, please update your question to include additional facts.
S.Lott
Well, I'm interested in what a developer would use in *each individual development environment*. Your comment seems to imply that anything non windows would use this, which I dissagree with - hence the PHP example.
UpTheCreek
heh thanks, :) .
UpTheCreek
See http://www.gnu.org/software/hello/manual/gettext/Programmers.html which describes the relationship between posix-nls (the catgets() function) and the GNU gettext library which is more common for managing localization on Unix platforms.
Ken Bloom
+2  A: 

Java uses Properties, which are key-value pairs.

They can be serialized to the following two formats:

  1. .properties

    foo=bar

  2. .XML

    <entry key="foo">bar</entry>

Mike Sickler
+1  A: 

Like Java, Adobe Flex also uses ResourceBundles that are serialized to .properties files

Mike Sickler
A: 

Large translation vendors accept the TMX file format for interchange of translation strings. Because they only have to deal with a standard xml file rather than strings embedded in controls, the amount of work these vendors have to do is reduced and so are their fees.

Phillip Ngan
TMX is used for translation memories. Document translations are better stored in XLIFF files.
Serge - appTranslator
A: 

The standard way to do this on Linux is to use the gettext library, which stores its translations in .po files.

Ken Bloom
A: 

Cocoa applications (Mac/iPhone) are distributed as bundles (essentially: folders but with a known file-ish type). Inside a bundle, you can provide copies of strings files or other localized resources in a locale-specific subfolder. The Xcode provides IDE support for this, and the Cocoa frameworks provide many methods to conveniently fetch these resources.

See http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPInternational/Articles/InternatAndLocaliz.html for details.

natevw