AAAAcfaction_multi_language.ctp 0000666 00000000221 15137465554 0012135 0 ustar 00 translate($form, $actiondata);
?> multi_language.ctp 0000666 00000007147 15137465554 0010305 0 ustar 00
Header(array('settings' => 'Settings', 'help' => 'Help'), 'multi_language_config_{n}'); ?>
tabStart('settings'); ?>
input('action_multi_language_{n}_lang_tag_config', array('type' => 'text', 'label' => "Language Tag", 'class' => 'small_input', 'smalldesc' => "The language tag, e.g: en-US OR en-GB OR de-DE")); ?>
input('action_multi_language_{n}_content1_config', array('type' => 'textarea', 'label' => "Translation strings", 'label_over' => true, 'rows' => 20, 'cols' => 70, 'smalldesc' => 'Srings to be translated with their translation in the language set above, multi line format, e.g: non_translated_string=translated_string.')); ?>
input('action_multi_language_{n}_translate_output_config', array('type' => 'select', 'label' => "Translate output", 'options' => array(0 => 'No', 1 => 'Yes'), 'smalldesc' => "Should the form output be scanned for translatable strings ? this option should not be needed unless you have dynamic text generation in one of your form elements/actions.")); ?>
tabEnd(); ?>
tabStart('help'); ?>
- Enter your language tag.
- It's strongly advised that you use dummy unique language strings for those strings you are planning to translate, e.g: instead of using "Name" in your label, please use "NAME" or better "NAME_LABEL", this will make translations easier and more accurate.
- Add your desired translation strings in multi line format.
- This action should be placed the FIRST thing in any of your form events so that it's able to translate all strings in the actions and code.
- Please pay attention that this action will do translations (text replacements) for ALL actions below it, this includes any action's content or configuration, for example, if its placed above the email action, it can change the TO address if it contains any string matches any of the translatable ones.
tabEnd(); ?>