Find the Exponential Software extensions you want
| UNIX name | Owner | Status |
|---|---|---|
| tstranslate | eZ Publish Legacy | stable |
| Version | Compatible with |
|---|---|
| N/A | N/A |
Will let you make translations on strings in translations files directly,
inline in your frontend web pages.
Makes it simple for editors to do translations, by the hit of a shortcut key,
and instantly see where the translations strings fit in the website.
When the editor press Ctrl - Alt - t while on a page, all translations strings
on that page will light up with a red background color. Click on one of these,
and you get an input box to translate the string.
Add ActiveAccessExtensions[]=tstranslate in your frontend siteaccesses site.ini.append.php
Do not use ActiveExtensions[], since the settings will not be overriden correctly
Modify file /config.php (or copy from config.php-RECOMMENDED) and add line:
define( 'EZP_AUTOLOAD_ALLOW_KERNEL_OVERRIDE', true );
This is because TS Translate requires a kernel hack to work.
Class ezpI18n will be overridden. The included class is from eZ Publish 4.7.
The changed section in this class is clearly defined in the source code, to facilitate easier upgrade.
Then run the autoload update scripts like this:
php bin/php/ezpgenerateautoloads.php -o
php bin/php/ezpgenerateautoloads.php -e
Include template translate_list.tpl at the bottom of your pagelayout.tpl template (after all translation strings have been displayed):
{include uri='design:tstranslate/translate_list.tpl'}
TranslationsFolder, specify the folder of the translations files that should be editable, typically:
TranslationsFolder=extension/my_extension/translations/
Translation files you want to edit must be writeable by Apache
ExcludeList, specify your custom translations strings that can not be edited inline,
for instance button texts etc.
You can specify a whole context by it's name, or a single string on the format "<context name>;<string>"
Every page view by users with access to tstranslate will clear a bunch of caches (all template cache and content view cache),
so it is not recommended to use this functionality on production server.
Idea, proof of concept and development: Arne Bakkebø
Development: Tomasz Madeyski
For Making Waves, http://www.makingwaves.no