diff options
author | ArthurHoaro <arthur@hoa.ro> | 2018-03-26 20:26:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-26 20:26:10 +0200 |
commit | 9b2bd66fb60ffd5a833480bf329062c7d57bc8c4 (patch) | |
tree | d0a99bd7b366a9bdd6c92ab9e95db6dce4de1d3c /doc | |
parent | 838ef8a6ec140bd21124258e584be220be55048f (diff) | |
parent | 68c6afc56f3758154cfb96cba6fd48a6b5535590 (diff) | |
download | Shaarli-9b2bd66fb60ffd5a833480bf329062c7d57bc8c4.tar.gz Shaarli-9b2bd66fb60ffd5a833480bf329062c7d57bc8c4.tar.zst Shaarli-9b2bd66fb60ffd5a833480bf329062c7d57bc8c4.zip |
Merge pull request #1093 from ArthurHoaro/feature/theme-translation
Load theme translations files automatically
Diffstat (limited to 'doc')
-rw-r--r-- | doc/md/Translations.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/md/Translations.md b/doc/md/Translations.md index 54a36655..c7d33855 100644 --- a/doc/md/Translations.md +++ b/doc/md/Translations.md | |||
@@ -76,6 +76,18 @@ Then click on the "Update" button, and you can start to translate every availabl | |||
76 | 76 | ||
77 | Save when you're done, then you can submit a pull request containing the new `shaarli.po`. | 77 | Save when you're done, then you can submit a pull request containing the new `shaarli.po`. |
78 | 78 | ||
79 | ### Theme translations | ||
80 | |||
81 | Theme translation extensions are loaded automatically if they're present. | ||
82 | |||
83 | As a theme developer, all you have to do is to add the `.po` and `.mo` compiled file like this: | ||
84 | |||
85 | tpl/<theme name>/language/<lang>/LC_MESSAGES/<theme name>.po | ||
86 | tpl/<theme name>/language/<lang>/LC_MESSAGES/<theme name>.mo | ||
87 | |||
88 | Where `<lang>` is the ISO 3166-1 alpha-2 language code. | ||
89 | Read the following section "Extend Shaarli's translation" to learn how to generate those files. | ||
90 | |||
79 | ### Extend Shaarli's translation | 91 | ### Extend Shaarli's translation |
80 | 92 | ||
81 | If you're writing a custom theme, or a non official plugin, you might want to use the translation system, | 93 | If you're writing a custom theme, or a non official plugin, you might want to use the translation system, |