I18n with gettext for Hugo
Project description
hugo-gettext
I18n with gettext for Hugo.
Install
pip install hugo-gettext
Custom functions
The path of the file should be passed as an argument to the command line with -c
or --customs
option,
or set in the config file with customs
key.
The following functions are called to make default_domain_name
, excluded_keys
,
report_address
, and team_address
attributes of the Config
:
get_default_domain_name
: will be called withpackage
as an argument, returnspackage
by defaultget_custom_excluded_keys
: returns an empty set by defaultget_pot_fields
: returns a dictionary of'report_address'
and'team_address'
keys
Two functions are called during the generation step:
load_lang_names
: returns an empty dictionary by defaultconvert_lang_code
: function to convert gettext language codes to Hugo language codes, returns gettext language codes by default
hg-stop shortcode to stop processing a content file
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hugo_gettext-0.2.0.tar.gz
(18.0 kB
view hashes)
Built Distribution
Close
Hashes for hugo_gettext-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b49f195ecd4f5a571b2980268bbf21439f917fe762a77e7a73a86f544934d859 |
|
MD5 | 14ca027e4b2a0664fc7e15992d448499 |
|
BLAKE2b-256 | 62c616ce88a02bab4480a1d8aa4205b1e25e0da7692a3c5b329ef3c42ad68ab2 |