Skip to content

This project is an example about how to translate your python scripts using gettext - python library.

Notifications You must be signed in to change notification settings

alelles16/internationalization_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Internationalization python

This project is an example about how to translate your python scripts using gettext - python library.

You can read more about gettext and how install and prepare your environment in your machine.

📚📚📚

Internacionalización de programas Python

How To Translate Python Applications With The GNU Gettext Module

Generate .POT file

We need to generate a .pot file. This file is a catalog of unprocessed messages, these messages are those translatable strings that we have marked in our program, in this case with _ that we put before the string that we want to translate.

You can use this command to generate .pot file.

pygettext -d base -p locale main.py

🚨The previous command is not working for me. I need to use pygettext.py because my OS has some problems with that. If you have problems too, you can use the next command:

python pygettext.py -d base -o locale/base.pot main.py

License

MIT

About

This project is an example about how to translate your python scripts using gettext - python library.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages