Bilingual JobRoller? Oh, yeah! I had problems with that but I succeed.
Hi all,
Recently a client asked me if i can make JobRoller bilingual. After installing and reinstalling all from the scratch I find a way to make this great theme bilingual.
It's more easy that you think:
- install Wordpress 3.4.x (fresh install)
- install JobRoller 1.6.x (fresh install)
- change permalinks to %postname% (be sure you update the .htaccess file too)
- configure JobRoller like usual
- install Polylang plugin:
http://wordpress.org/extend/plugins/polylang/
- add 2 (or more) languages on plugin settings
- do not forget to add the translation inside the jobroller theme folder (ex: fr_FR.po and fr_FR.mo, en_US.po and us_EN.mo)
(search for Poedit free software if you don't know how to add languages po/mo files)
- do not change menu tab in polylang settings
- update string translations tab
- set the following settings in the settings tab: Uncheck detect broser language,
check "The language code, for example /en/, is added to all urls when using pretty permalinks."
check "Remove /language/ in pretty permalinks. Example: http://profemed.com/jobs/en/"
let unchecked the Hide URL language information for default language
check "Allow to synchronize categories, tags, featured image and other metas between translations of a post or page"
-
IMPORTANT: add translation for one page only: "Contact" page by clicking the plus sign near the languages when displaying all pages
- around line 44 in header.php add what's in bold
<div id="mainNav">
<ul><?php pll_the_languages(array('show_flags'=>1,'show_name s'=>1));?></ul><?php wp_nav_menu( array( 'theme_location' => 'primary', 'container' => '', 'depth' => 1, 'fallback_cb' => 'default_primary_nav' ) );?></div>
- in the theme-support.php
around line 98 change link to
site_url(substr(get_bloginfo('language'),0,2).'/dashboard')
around line 107 change link to
site_url(substr(get_bloginfo('language'),0,2).'/login')
and around line 120 change link to:
site_url(substr(get_bloginfo('language'),0,2).'/submit')
Thas't it! I hope I saved couple of hours to somebody!
Mods, maybe it's not a bad idea to integrate this within the theme in the new release!
Let me know your opinions! Thanks guys.
Last edited by bluehat; October 16th, 2012 at 11:10 AM.
Reason: more info