If I made a plugin and have translations for that plugin in two or more languages. How should I handle translations in the plugin?
What I need:
* some default label to be shown if no translation is found per translation
* translations related to one plugin only (so i don't mess up ckeditors translations)
* language selection must come from ckeditor
What I need:
* some default label to be shown if no translation is found per translation
* translations related to one plugin only (so i don't mess up ckeditors translations)
* language selection must come from ckeditor
Re: How to handle translations for custom plugin
1. Checkout a SVN trunk of CKEditor;
2. Create you plugin's language entry in en.js ( and any other translated language )
3. Run \_dev\langtool\langtool.bat(sh) to populate missing entries for all other missing languages.
Re: How to handle translations for custom plugin
I can see possible problems arising from this though. It's hard for independent developers to share CKEditor plugins since endusers must checkout the trunk and do this manually, which is most likely too complicated for average drupal/cms enduser.
Another problem is that when upgrading CKEditor on production site you have to remember to add translations you have from custom plugins and then again add translations using bat/sh to other files.
I would propose that translation files could be read from plugin directories and compiled to lang -directory with this bat. This would allow adding of new plugins easily to CKEditor and upgrading would also become a lot easier. Or am I missing a point somewhere?
Re: How to handle translations for custom plugin
I think that someone already posted some example code, basically you put you language files under the /lang of your plugin and define them in the plugin object.
Re: How to handle translations for custom plugin
I would really appreciate if you could paste that link here. I started this thread since I couln't find way to do that and I still can't.
Re: How to handle translations for custom plugin
I know that it works because I'm using it in a plugin that I'm updating, so you'll be able to see it when I release it, although I'm quite sure that other people has already posted other plugins or snippets showing how to use it.
Re: How to handle translations for custom plugin
Re: How to handle translations for custom plugin
I've wrote a short post with my explanation about how to use translations in a plugin