Example #1
0
 /**
  * Support for i18n with wpml, polyglot or qtrans
  *
  * @param string $in
  * @param string $name (optional) required for wpml to determine the type of translation
  * @return string $in localized
  */
 static function i18n($in, $name = null)
 {
     if (function_exists('langswitch_filter_langs_with_message')) {
         $in = langswitch_filter_langs_with_message($in);
     }
     if (function_exists('polyglot_filter')) {
         $in = polyglot_filter($in);
     }
     if (function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {
         $in = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($in);
     }
     if (is_string($name) && !empty($name) && function_exists('icl_translate')) {
         $in = icl_translate('plugin_ngg', $name, $in, true);
     }
     $in = apply_filters('localization', $in);
     return $in;
 }
 function internationalize($in)
 {
     if (function_exists('langswitch_filter_langs_with_message')) {
         $in = langswitch_filter_langs_with_message($in);
     }
     if (function_exists('polyglot_filter')) {
         $in = polyglot_filter($in);
     }
     if (function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {
         $in = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($in);
     }
     $in = apply_filters('localization', $in);
     return $in;
 }
Example #3
0
 function internationalize($in)
 {
     if (function_exists('langswitch_filter_langs_with_message')) {
         $in = langswitch_filter_langs_with_message($in);
     }
     if (function_exists('polyglot_filter')) {
         $in = polyglot_filter($in);
     }
     return $in;
 }