Javascript localization doesn’t load. How to Internationalize javascript without plugin?

Good News after 2 days! I resolved my issue, but I believe that wp i18n make-json does not generate the json file correctly. Why? Because it uses the ISO codes and not the locale (get_locale()) from the browser/user. So it isn’t “en_GB” that should be used but “en” in the .json file. This : “locale_data”: … Read more

How to change the lang=”en-US” value of the HTML document?

The value for that string is normally taken from the option WPLANG in your database table $prefix_options. You can set it in the backend under Settings/General (wp-admin/options-general.php) or per SQL. There several ways to change that value per PHP: Create a global variable $locale in your wp-config.php: $locale=”en_GB”; Declare the constant WPLANG in your wp-config.php: … Read more

Custom post type slug localization

First, you should have to register your custom post type with a generic, language-independent slug because the slug in register_post_type is not meant to be dynamic. and then modify rewrite rule try this snippet function register_custom_post_type_services() { $labels = array( ‘name’ => _x(‘Services’, ‘Post Type General Name’, ‘text_domain’), ‘singular_name’ => _x(‘Service’, ‘Post Type Singular Name’, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)