0

I had created one plugin for meta boxes for some post types and created widget but qtranslate not apply for my meta boxes fields and widget fields. please suggest me i18n-config.json setting for my plugins and widget.

  • Wherever in your php code where you adding your strings you need to wrap them as __('Add Field XYZ', 'text-domain'); now any translation plugin might be able to pick and replace those strings. – Muhammad Asadullah Jul 31 '17 at 13:33

1 Answers1

0

Simply wrap the text with __() function, before it gets outputed, like so:

$text = __($text);
...

This should filter the text containing the qTranslate language tags to the currently selected language.

For echoing the text, use _e() instead.

user8230352
  • 1,775
  • 1
  • 9
  • 13