Plugin that allows you to translate your website.
Features:
- Reads Craft::t(), Craft.t() and ""|t()
- Saves translations in own plugin translations folder
- Friendly UI (Select locale, search, select location, filter files, browse paths)
- Register your own translation sources with hook "registerTranslateSources"
Todo:
- Better UI (Show filepath, more locations)
- Google Translate support
Important: The plugin's folder should be named "translate"
With the release of Craft 3 on 4-4-2018, this plugin has been deprecated. You can still use this with Craft 2 but you are encouraged to use (and develop) a Craft 3 version. At this moment, I have no plans to do so.
Run this from your Craft installation to test your changes to this plugin before submitting a Pull Request
phpunit --bootstrap craft/app/tests/bootstrap.php --configuration craft/plugins/translate/phpunit.xml.dist --coverage-text craft/plugins/translate/tests
- Add node_modules to excluded vendor folders (thanks to @tcsehv)
- All service code is now fully covered by unit tests
- Added Craft 2.5 compatibility
- Added support for finding translatable strings in object notation
- Added a MIT license
- Only init with local stored locale when there is any, else init with default instead of empty - this prevented saving in some occasions
- Added the ability to read the translate tag when setting variables in twig
- Verify matched translatable files as valid source
- Added support for nested plugin and template sources
- Added JSON, Atom and RSS support
- Added getCsrfInput function to forms
Warning! This version is updated for Craft 2.3 and does NOT work on Craft 2.2
- Fixed a bug where opening twig files would not match any expression
- Added support for opening .twig files
- Don't encode table attribute html, closing issue #2
- Merge translations so we don't lose translations, fixing issue #1
- Added a "registerTranslateSources" hook to add translate sources
- Allow more filters after |translate
- Enforce UTF-8 encoding on CSV download
- Added ability to easily select a locale
- Added ability to search for words/translations
- Added ability to look in a specific location
- Added ability to upload updated translations (csv)
- Added ability to download translations (csv)
- Initial push to GitHub