Skip to content

Translating spark_plug

steinkel edited this page Sep 14, 2010 · 1 revision

Translating to another language is simple:

  • Use the new Trans helper
  • In your views, use

echo $trans→__(‘phrase to translate’);

  • The translation files are under app/plugins/spark_plug/locale
  • Also you can create automatically the .POT file, and then use poedit to manage the translations (recommended). Use the cake console from app/plugins/spark_plug and launch the ‘i18n’ task

cake i18n

  • when you are asked to type the first folder, use the path to the spark plugin (to generate only the labels for the plugin and not all the labels inside your application)
  • don’t forget to set your language in config/core.php

Configure::write(‘Config.language’, ‘esp’);

  • or use any other lang plugin

Clone this wiki locally