help-bison
[Top][All Lists]
Advanced

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

Re: Windows Internationalization


From: Tim Van Holder
Subject: Re: Windows Internationalization
Date: Fri, 11 Jul 2008 20:18:31 +0200
User-agent: Thunderbird 2.0.0.14 (Windows/20080421)

Luca wrote:
Hello!

I have written a compiler for a pascal-like language, using flex and bison.
The compiler is built under Windows using Visual Studio and works very well, however how can I provide an internationalization? I need to translate syntax error messages generated by bison's parser in another language, different from English.

Thanx in advance.

As part of the bison package, there is a "bison-runtime" gettext domain.
This provides the messages shown by bison-generated code at runtime.
If
 a) you provide a version of this catalog for the language you need, and
 b) you include the gettext library in your application the "normal"
    way, and
 b) set the LANGUAGE environment variable to that language (e.g. "it"
    for Italian) before running your executable
then your compiler should automatically use those translations. This requires that the bison-runtime catalogs be installed (they would be as part of a bison installation, but I'm not quite sure how to set up your own configury to include & distribute them). Ideally, you would then also set up a message catalog for all other messages you yourself produce in your compiler. Note that I don't think flex 2.5.4a or earlier provided i18n for its runtime messages; the newer versions might.

For a list of languages already supported by bison-runtime, see here:
  http://translationproject.org/domain/bison-runtime.html
If you want to improve upon translations, or provide a new one for a language not already supported, see
  http://translationproject.org/html/translators.html
for how to join a translation team and start translating.




reply via email to

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