idea_lt / langed
Silverstripe 3 Language editor
dev-master
2014-01-16 15:20 UTC
Requires
Replaces
- silverstripe/langed: *
This package is not auto-updated.
Last update: 2025-03-25 09:31:44 UTC
README
Maintainer Contacts
- IDEA (silverstripe@idea.lt)
Requirements
- SilverStripe 3.x
- Translatable (module)
Installation Instructions
- Place this directory in the root of your SilverStripe installation.
- Visit
project/dev/build
to rebuild the database.
Usage Overview
List modules you need to translate in mysite/_config.php
Ex. TranslationCollector::setCollectableModules(array('faq', 'news', 'themes/mytheme'));
Add these lines into your Page.php file Page_Controller::init method
i18n::set_locale(Translatable::get_current_locale());
i18n::set_default_locale(Translatable::get_current_locale());
Join all listed translations into one file
- Run
http://project/dev/tasks/i18nTextCollectorTask?locale=en_US
- Now run collector task for
langed
modulehttp://project/dev/tasks/i18nTextCollectorTask?locale=en_US&module=langed
- After this you have
langed/lang/en_US.yml
which has all the translations from the modules listed inmysite/_config.php
- You can translate it in admin. "Language Editor" tab.
- For other locales repeat 1-4 steps, just replace en_US with another locale.