If I open a post using the theme ‘Twenty Eleven’ no sidebar is shown.
So the ‘qTranslate choose language’-widged is not shown either.
The solution:
Add in the header.php-file of the theme
just above:
</header><!-- #branding -->
the following lines:
<div id="access-language" class="access-language">
<?php qtrans_generateLanguageSelectCode('image'); ?>
</div>
‘image’ displays only Flaggs,
‘text’ only the textual representation and
‘both’ shows the flaggs along with the text.
Category Archives: Wordpress
avoid switch to default language when searching with qTranslate
When using the query-mode (the language is noted as an attached ‘?lang=en’ in the URL) a performed search shows the results in the default language (which could be the one selected in the browser settings, not the one chosen by a user).
The Solution:
Add the following to ‘Searchform.php’ in ‘design’ -> ‘Editor’
just in front of the ‘<\form>‘ tag:
<input type="hidden" name="lang" value="<?php echo qtrans_getLanguage(); ?>">
… this way the language-parameter will be added to the URL as a hidden field.
Source: http://stackoverflow.com/questions/8435113/wordpress-qtranslate-keep-dont-keep-lang-on-word-search
qTranslate horizontal flaggs
The language-choise flags can be presented in a nicer way, with horizontally aligned flags:
! update from 2/4/2014 !
It is best to first create a “Child Theme”.
Next, add the following lines to your Style.css (in ‘Design’ -> ‘Editor’):
Continue reading
repair qTranslate for the theme ‘Twenty Eleven’
I use qTranslate to multilingualize my posts.
Saidly installing it overwrote some translations that have been working before. For example, “Hinterlasse eine Antwort” (german) should be shown instead of “leave a reply”, which isn’t.
The solution: (Re-)Install the latest translation files:
Download them from:
http://svn.automattic.com/wordpress-i18n/de_DE/trunk/messages/twentyeleven/
Files: *.po and *.mo, copy them to:
[WordpressInstallation]/wp-content/themes/twentyeleven/languages