qtranslate (language definition) when translation for selected language doesn’t exist [closed]
you should find this options in qtranslate configuration page: “hide not translated content” (or something similar to)
you should find this options in qtranslate configuration page: “hide not translated content” (or something similar to)
I figured this one out too, 1-2 hours of research! So, to make qtranslate quick tags work with custom fields, this is what you do: <?php _e(get_post_meta($post->ID, ‘Activities’, true));?> _e and all quicktags work perfectly but not full version but shorthand version [:en] etc.
The define(‘WPLANG’, ‘ru_RU’); in the wp-config.php is no longer needed, as WordPress stores this value in the database (starting from version 4.0). However, I suppose your problem is actually something different. Your Steps: Add a filter to locale To ensure your language is set correctly, use a code like this: add_filter( ‘locale’, ‘f711_set_language’ ); function … Read more
This might help: http://www.gish.se/wg-qtranslate.zip – download and install, then fix plugin, changing: foreach($content as $language => $lang_text) { $lang_text = trim($lang_text); if(!empty($lang_text)) $languages[] = $language ; } to foreach($content as $lang => $lang_text) { $lang_text = trim($lang_text); if(!empty($lang_text)) $languages[] = $lang ; } taken from http://www.qianqin.de/qtranslate/forum/viewtopic.php?f=3&t=2958, works in most cases
1) The plugin doesn’t automatically provide translation – you have to fill it in yourself. However, there is a service you can use to get your translations: With qTranslate 2.3, a new feature called “qTranslate Services” have been added. So what does it do? Well, with qTranslate Services, qTranslate can finally do what the name … Read more
Following the codex about the get_header function You must have an archive header-de.php in your template. Create one for each language you have and adjust the switch accordingly. <?php if(function_exists(‘qtrans_getLanguage’)) { $lingo = qtrans_getLanguage(); switch ($lingo) { case ‘de’: get_header(‘de’); break; default: get_header(); break; } } else { get_header(); }
Most correct way to do this would be to use WordPress translations. You should replace this static text with: <?php _e(‘YOUR TEXT’, ‘your_text_domain’); ?> And add text domain to your theme. More on this topic: http://codex.wordpress.org/I18n_for_WordPress_Developers You can also… … use qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage function. Just use it like so: <?php echo qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage(‘<!–en:–>Latest News<!–:–><!–fr:–>dernières Nouvelles<!–:–>’); ?>
The difference in your case is in filters being applied to output of these functions. While bloginfo applies one of these filters: if ( ‘display’ == $filter ) { if ( $url ) $output = apply_filters(‘bloginfo_url’, $output, $show); else $output = apply_filters(‘bloginfo’, $output, $show); } Function home_url applies this filter: return apply_filters( ‘home_url’, $url, $path, … Read more