bug-gettext
[Top][All Lists]
Advanced

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

Using gettext for GUI


From: Дмитрий Зотов
Subject: Using gettext for GUI
Date: Sat, 30 Nov 2024 06:47:45 +0200

This page raises the question and the solution (https://ftp.gnu.org/old-gnu/Manuals/glibc-2.2.3/html_chapter/libc_8.html#SEC136).

But, you can also use the concept of sections. To get a message with multiple context translations, you can call the function with an additional argument - the name of the section, which can play the role of context. A translation file with messages may contain several versions of the translation under section names. The translation in the main section can be obtained in the usual way, without any additional argument. This means not all messages, but only the necessary messages. In one section there is usually one, or several messages.

For example,

#volume=menu|file
Open...=
Close=

#volume=
Open...=
Close=

. The untitled section is the main (here is the second one) one.

reply via email to

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