[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Iterating over variable using AC_DEFINE to get HAVE_FOO_varitem (sim

From: Steffen Dettmer
Subject: Re: Iterating over variable using AC_DEFINE to get HAVE_FOO_varitem (similar to AC_CHECK_HEADERS)
Date: Tue, 18 May 2010 11:18:36 +0200

* On Mon, May 17, 2010 at 9:44 PM, <address@hidden> wrote:
> * Am Montag, den 17.05.2010, 10:18 -0600 schrieb Eric Blake:
> > What you are attempting doesn't make much sense to me yet.
> > The whole point of i18n is that the translation files can be
> > maintained independently of the executable, and that a person
> > can install a subset of the compiled .mo files according to
> > their needs.
> The rationale behind is, that the user should be able to choose
> the language from the preferences. Of course it should only
> contain languages shipped with the source/binary. Therefor I
> would like to have something like this
> ALL_LINGUAS="de fr"

you could tokenize and iterate it in C code - allowing to
overwrite `ALL_LINGUAS' via environment, ~/.rc or alike.

> src/foo.c:
> list_of_langs = add_to_list(
>        "Deutsch",
> #endif
>        "Fran├žais",
> #endif
>        "Nederlands",
> #endif
>        NULL);
> > Therefore, any compile-time test that sets a variable
> > HAVE_LINGUA_foo in relation to the languages on the
> > compilation machine will most likely be out-of-date when you
> > copy the executable but not the translation file to a user's
> > machine.  Conversely, a translation language not available at
> > configure time might later be written and installed, at which
> > point your executable is already hard-coded not to use it.
> That's true. But ion the above situation IMHO you cannot handle
> this case. IMHO you could only add all possible languages and
> check, if setting the related locale succeeds. Am I wrong?

I guess an idea is that the application itself shouldn't need to
know about the installed locales and the application shouldn't
need to have an own preferences dialog, but have some user-global
inherited setting. On a modern linux I would expect that the
super-GUI has some tool to set that (some `control panel' or so)
and/or have a language selection in the login dialog. I could
even imagine that the language configuration tool may fetch
missing languages from some package repository.

However, if an application really needs to know the available
languages, wouldn't there be a way to find out what it installed,
for example using readdir(3)?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]