[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [E-devel] Re: context menu
On 2/17/06, Stafford Horne <firstname.lastname@example.org> wrote:
This is a bit tricky. locale_path will be null for a few locales.
en_US, C and en_US.utf8 and so on. This is because we always fall back
to C for those translations. So textdomain will not be called for those
Do you see any problem if we call textdomain(PACKAGE) always after
changing the locale?
I haven't seen any problem when calling it always, but after (further)
testing I'm not sure it's required either, since the translations
(aside from those in the module menus) do seem to change even when
switching back out to POSIX / C locales.
So the only (minor) improvement I can claim from the patch I posted
last time is that we won't get those "sorry couldn't find your locale"
messages on stderr when switching back to the C locale, but that
doesn't require a textdomain call to achieve, i.e. my last patch but
+ else if (strcmp(alias_locale, "C") == 0)
// no need to even call textdomain?
I'm going to read the gettext source again when I have some more time -
there must be some trick to how gettext knew to invalidate it's cache
and display english even though _nl_msg_cat_cntr had not been
incremented (on the change back to posix locale).