readme.txt 851 B

12345678910111213141516171819
  1. Official info about translation: http://codex.wordpress.org/Translating_WordPress
  2. In two words: open default.po file and save new copy as js_composer-es_ES.po for Spanish.
  3. And then use translating program to translate it to Spanish language.
  4. // Code to be placed in functions.php of your theme or a custom plugin file.
  5. add_filter( 'load_textdomain_mofile', 'load_custom_plugin_translation_file', 10, 2 );
  6. /*
  7. * Replace 'textdomain' with your plugin's textdomain. e.g. 'js_composer'.
  8. * File to be named, for example, yourtranslationfile-en_GB.mo
  9. * File to be placed, for example, wp-content/lanaguages/js_composer/js_composer-en_GB.mo
  10. */
  11. function load_custom_plugin_translation_file( $mofile, $domain ) {
  12. if ( 'js_composer' === $domain ) {
  13. $mofile = WP_LANG_DIR . '/js_composer/js_composer-' . get_locale() . '.mo';
  14. }
  15. return $mofile;
  16. }