[MonoDevelop] Gettext support

Todd Berman tberman@sevenl.net
Sun, 04 Apr 2004 00:44:39 -0500


I have begun to commit a series of changes to move our i18n to use
gettext.

Basically, what this means to you as a (potential) monodevelop developer
is this:

Any call to a string that should be translated (just about anything you
show to users) needs to be encased with a GettextCatalog.GetString ()
call. So, if you were going to use "Somestring" you would do
GettextCatalog.GetString ("Somestring").

This also means that if you were planning on using "some stuff " +
variable + " some more stuff" a better option would be: String.Format
(GettextCatalog.GetString ("some stuff {0} some more stuff"), variable).

This allows the translator to potentially move the variable if it makes
sense in their language.

One thing to keep in mind with this, is right now there are no tools
that will automate adding the translatable strings to the right file, so
you have to add the path to po/POTFILES.in . This means that if you add
a new file to be translated in "src/Main/Base/NewFile.cs" you need to
add src/Main/Base/NewFile.cs to po/POTFILES.in.

If you are going through the source, and notice potential places to
translate that are not yet properly done, please send patches, they will
be greatly appreciated.

And if you are sending patches for new code, please do this, or your
patch will be sent back with this request.

--Todd