"Asger K. Alstrup Nielsen" <[EMAIL PROTECTED]> wrote:

> > - muddle on with gettext
>
> This is the least intrusive solution, and thus the safest one.

Do you mean something like:

/* FileGetText: This is C. */
/* Use it as
   #define __(str) fgettext(\
         LibFileSearch(\
             "layout_messages", \
             current_view->currentBuffer()->params.language, \
             "mo").c_str(), \
         str)
*/
#include <sys/types.h>
#include "gettext.h"
#include "gettextP.h"

extern char *find_msg(struct loaded_l10nfile *domain_file, const char *msgid);

char *fgettext(char *fullpath_to_msgobj, const char *msgid)
{
    struct loaded_l10nfile *domain_file;
    char *retval;

    domain_file->filename = fullpath_to_msgobj;
    _nl_load_domain (domain_file);
    retval = find_msg (domain_file, msgid);

    return retval ? retval : msgid;
}


?
The obvious problem with this approach is that we have to link GNU
version of libintl.  But if we are going to adopt this, then the
rest is to write a script to extract .po files from .ldf files.

Regards,
        SMiyata

Reply via email to