diff options
author | fox <[email protected]> | 2019-03-01 11:38:07 +0000 |
---|---|---|
committer | fox <[email protected]> | 2019-03-01 11:38:07 +0000 |
commit | b3688dacd15e75b379609d7a91b2439074c59d05 (patch) | |
tree | acfaffd8e629b118c15a52281e5f9ec835eca765 | |
parent | e5e5c54add240af4a7e7e3f5f432157cd7a5f992 (diff) |
Update page 'MakingPlugins'
-rw-r--r-- | MakingPlugins.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/MakingPlugins.md b/MakingPlugins.md index ec27bc2..f116bee 100644 --- a/MakingPlugins.md +++ b/MakingPlugins.md @@ -16,10 +16,12 @@ Some example plugins are available in the [samples](https://git.tt-rss.org/git/t See ``time_to_read`` plugin for a complete example here: https://git.tt-rss.org/fox/ttrss-time-to-read
+### How to implement
+
- Plugin translations are placed in a separate Gettext domain (name equals lowercase plugin class).
- Translation (.po) file in ``(plugin dir)/locale/LANG/`` name should correspond to Gettext domain name.
-### Using gettext
+### How to use
- On the PHP side, either use ``P__``, ``P__ngettext``, etc. shortcut functions defined in ``classes/pluginhost.php`` or call ``_dgettext`` group of functions directly.
- On the Javascript side, translations are combined together, so you can use the usual ``__()`` shortcut function.
|