diff options
| author | 2014-12-18 18:59:13 +0100 | |
|---|---|---|
| committer | 2014-12-18 18:59:13 +0100 | |
| commit | 26da4aa448906f857a252507b34d369a386043c6 (patch) | |
| tree | 2275955b56b1b42c0bb59a92c95abaafc6cb1cb0 /lib/Minz/Extension.php | |
| parent | 251d5a78ce893676c7e32e2a85c9ba45775a72bf (diff) | |
Update Minz_Translation
- Give possibility to register new i18n files
- Add a extension->registerTranslates() method
- extensions can define new strings or override previous ones
Fix https://github.com/FreshRSS/FreshRSS/issues/731
Diffstat (limited to 'lib/Minz/Extension.php')
| -rw-r--r-- | lib/Minz/Extension.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Minz/Extension.php b/lib/Minz/Extension.php index e7b38448f..a24c718c3 100644 --- a/lib/Minz/Extension.php +++ b/lib/Minz/Extension.php @@ -179,6 +179,14 @@ class Minz_Extension { } /** + * Register i18n files from ext_dir/i18n/ + */ + public function registerTranslates() { + $i18n_dir = $this->path . '/i18n'; + Minz_Translate::registerPath($i18n_dir); + } + + /** * Register a new hook. * * @param $hook_name the hook name (must exist). |
