language.rst 966 B

12345678910111213141516171819202122232425262728293031323334
  1. Manage language
  2. ===============
  3. Automatic language
  4. ------------------
  5. By default, the bundle will try to automatically guess the language of your editor
  6. according to the request locale. If it is not available, it will fallback on the
  7. ``locale`` container parameter. If it is also not available, the editor language
  8. cannot be guessed and so, the editor will use the default editor language.
  9. Explicit language
  10. -----------------
  11. CKEditor allows you to customize the language used by the editor via the
  12. ``language`` config option. If you define this option, this explicit language
  13. will be used instead of the automatic one. You can do it globally in your
  14. configuration:
  15. .. code-block:: yaml
  16. # app/config/config.yml
  17. fos_ck_editor:
  18. configs:
  19. my_config:
  20. language: fr
  21. Or you can do it in your widget:
  22. .. code-block:: php
  23. $builder->add('field', 'ckeditor', array('config' => array(
  24. 'language' => 'fr',
  25. )));