www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Internationalization through GNU gettext

reply Bruno Haible <bruno clisp.org> writes:
GNU gettext version 0.25 and newer supports the D language.

This was announced in 
https://lists.gnu.org/archive/html/info-gnu/2025-05/msg00000.html.

In detail:
   - It ships with a library libintl_d.a, that contains the 
runtime code for using GNU gettext message catalogs in the D 
programming language.
   - The 'xgettext' program supports extracting localizable 
messages from D code into a POT file.
   - When doing so, 'xgettext' adds 'd-format' markers for D 
format strings.
   - The msgfmt program, when invoked as 'msgfmt -c', verifies the 
syntax of translations of D format strings.
   - A new example 'hello-d' has been added, that can be used as a 
starting point for internationalized packages.

This support of the D language follows all the good usage 
patterns from the other programming languages.
Oct 03
parent reply Dejan Lekic <dejan.lekic gmail.com> writes:
On Friday, 3 October 2025 at 22:56:44 UTC, Bruno Haible wrote:
 GNU gettext version 0.25 and newer supports the D language.

 This was announced in 
 https://lists.gnu.org/archive/html/info-gnu/2025-05/msg00000.html.

 In detail:
   - It ships with a library libintl_d.a, that contains the 
 runtime code for using GNU gettext message catalogs in the D 
 programming language.
   - The 'xgettext' program supports extracting localizable 
 messages from D code into a POT file.
   - When doing so, 'xgettext' adds 'd-format' markers for D 
 format strings.
   - The msgfmt program, when invoked as 'msgfmt -c', verifies 
 the syntax of translations of D format strings.
   - A new example 'hello-d' has been added, that can be used as 
 a starting point for internationalized packages.

 This support of the D language follows all the good usage 
 patterns from the other programming languages.
Amazing! Thanks Bruno! Do you mind writing an article or two about it that could serve as a guide? Or even better demonstrate it at the next beerconf that is happening monthly!?
Oct 06
parent Bastiaan Veelo <Bastiaan Veelo.net> writes:
On Monday, 6 October 2025 at 11:22:30 UTC, Dejan Lekic wrote:
 On Friday, 3 October 2025 at 22:56:44 UTC, Bruno Haible wrote:
 GNU gettext version 0.25 and newer supports the D language.

 This was announced in 
 https://lists.gnu.org/archive/html/info-gnu/2025-05/msg00000.html.
[...]
 Amazing! Thanks Bruno! Do you mind writing an article or two 
 about it that could serve as a guide? Or even better 
 demonstrate it at the next beerconf that is happening monthly!?
And for bonus points, compare it to my gettext package! https://code.dlang.org/packages/gettext https://youtu.be/FYKrXsnzrIM?si=h8eJ6G_wVb-k-93d -- Bastiaan.
Oct 07