How to change default country?
In order to change default country in WPJobBoard you will need to open file wp-config.php and inside it define WPLANG constant. For example in case of UK it will be:
define(“WPLANG”, “en_UK”);
Please note, this will change default country only for unregistered users. For registered users default country is picked from Company profile or Resume (depending on user type).
To find locale value for your country please see WordPress in Your Language page in WordPress Codex. You will find more details on changing WPLANG constant in WordPress Codex.
Last note, since WordPress 4.0 you also need to change country setting in wp-admin / Settings / Reading panel in order for the WPLANG to take effect.
Changing WPJobBoard language only
It is possible to change language for WPJobBoard only (basically this will come down to changing default country in dropdowns), in order to do so you will first need to find your country ISO 3166-1 numeric code. For the sake of example lets assume that you want to change country to Poland, so the ISO code will be 616.
Next add following code in your theme functions.php file, or create a new plugin and put the code there
add_filter("wpjb_locale", "my_wpjb_locale"); function my_wpjb_locale($locale) { return 616; }
(In the code you only need to change 616 to your contry ISO code.)
with the update of WordPress4, this fix doesn’t seem to work anymore.
@yaoming, i am working with version 4.0, and this seems to be working fine for me. Actually it should work regardless of WP version as long as there is WPLANG defined in wp-config.php file.
I found that I had to change the “Site Language” setting (at the bottom of the WordPress “General Settings” page) before this would work.
I added
define('WPLANG', 'en_CA');
to my wp-config and then changed the setting (as shown in the screenshot below). Only then did my forms start defaulting to Canada as the country.https://www.evernote.com/shard/s24/sh/55d7d120-b171-47bc-93be-fedfe8c9c5a0/0e036ec4a8d67b770b5fdb13957be81a
@Greg thanks for the update, yes since WP 4.0 additionally the “Site Language” needs to be changed.
Yes, changing the “languaje” option inside General settings that change the default country on company registration form