I'm running into an issue with gallery2 localization because the LANGUAGE variable is set.
Under NetBSD (4.0-BETA2), which has an OS-provided gnu-gettext 2.14 the LANG variable is the only one necessary, and if the LANGUAGE variable is set, the territory apparently needs to be omitted, but gallery is including it (for example, gallery is setting it to cs_CZ, and NetBSD is expecting cs).
If I tweak modules/core/classes/GalleryTranslator.class and remove 'putenv("LANGUAGE=${languageCode}");' everything works. The comments indicate that Mandrake requires LANGUAGE to be set.
Near as I can tell, NetBSD doesn't use LANGUAGE at all and this is a gettext thing, however my grasp of the nuances of NLS is weak, and is even weaker across platforms, so I'm not quite totally sure about this, nor am I sure what the correct answer is for dealing with this, if there really is one.
If there is a means within gallery to have OS-specific tweaks so that I can just not set this that would probably be the best answer. Right now I'm just maintaining a local patch, which I'd prefer not to do if I can avoid it.
If anyone can point me in the right direction, I can develop and test a patch and submit it as a bug.
thanks,
-Todd