diff options
author | sgiehl <stefan@piwik.org> | 2013-09-15 01:45:35 +0400 |
---|---|---|
committer | sgiehl <stefan@piwik.org> | 2013-09-15 01:45:35 +0400 |
commit | fd18ea20bc24cfa5a12a625370bca1fbe9339464 (patch) | |
tree | 198b6a50e23ddde088c969a7255b8a28db15fe64 /plugins/ExamplePlugin | |
parent | aa6bef276caf3390c2a2a8cf8aced6a8e4eb94f9 (diff) |
fixes #4151 removed _js hack
Diffstat (limited to 'plugins/ExamplePlugin')
-rw-r--r-- | plugins/ExamplePlugin/Controller.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/ExamplePlugin/Controller.php b/plugins/ExamplePlugin/Controller.php index 8b1c0625ca..05ee0a6928 100644 --- a/plugins/ExamplePlugin/Controller.php +++ b/plugins/ExamplePlugin/Controller.php @@ -123,8 +123,7 @@ class Controller extends \Piwik\Controller $out .= '<h3>i18n internationalization</h3>'; $out .= 'In order to translate strings within Javascript code, you can use the javascript function _pk_translate( token );. <ul><li>The "token" parameter is the string unique key found in the translation file. For this token string to be available in Javascript, you must - suffix your token by "_js" in the language file. For example, you can add <code>\'Goals_AddGoal_js\' => \'Add Goal\',</code> in the lang/en.php file</li> - <li>You can then print this string from your JS code by doing <code>_pk_translate(\'Goals_AddGoal_js\');</code>. + load it using the Translate.getClientSideTranslationKeys hook. </li></ul>'; $out .= '<h3>Reload a widget in the dashboard</h3>'; |