12
I am writing a small software in c++ and I would like to be able to translate it into other languages.
Looking quickly over the internet the most accepted tool in linux environments is the GNU gettext.
In the official documentation of the Gnome project this link taking a few steps to initialize the tool.
A part of the explanation is very good and quite obvious but I was left with some doubts along the way.
- How do I start the Intl/gettext with cmake? Usually I just add the libraries I need into my
CMakeLists.txt, but in the link above they use a shell script. - What is the purpose of the command
intltoolize? - I got a little confused with the file
POTFILES.in. If the translation is done in run-time, what is the purpose of listing the files that have something to be translated? When I compile these references will be lost anyway, so why should I mark them? - What is the purpose of the other files of the Internet (
intltool-extract.in,intltool-merge.inandintltool-update.in?
I don’t know if this helps, but some details of the project:
- I’m using g++
- Target language is c++17
- The library is already included in my project
gtkmm, so I don’t know if I need to include more dependencies to use thegettext.