Localization (commonly abbreviated as l10n) is a term used to describe the effort to make WordPress (and other such projects) available in languages other than English, for people from different locales, who use different dialects and local preferences.

learn more… | top users | synonyms (2)

3
votes
1answer
2k views

How do I override a parent theme's language files with a child theme?

I have a parent theme and a child theme, I would like to override the spanish .mo and .po files in the parent theme (or add them if they are not present in the parent theme) with the es_ES ones in my ...
2
votes
1answer
61 views

Can I use the same textdomain in two separate plugins?

I have two plugins lets name them PluginA and PluginB. Both are part of the same project I want to internationalize the text. The question is if I use same textdomain 'myplugin' but make two files ...
2
votes
1answer
2k views

get_locale() behaving strange in same functions.php file

I'm developing a multi-language web portal for my client - in English and Bengali. Instead of using multisite, I installed Polylang plugin. It's working fine through the website. For different CSS ...
1
vote
1answer
41 views

Setting frontend locale based on postmeta not loading translation

I'm trying to show different language on front end based on page post meta setting. Mine problem is that I can see that locale is changed, but text still stays in English. Only if I change locale ...
1
vote
1answer
149 views

Easy export/import of data for Translation

We have several WordPress sites that we're going to get translated, however after some research this doesn't seem like an easy task. Preferred scenario 1) Ability to export all strings from themes, ...
1
vote
1answer
134 views

Local Wordpress installs don't verfiy against wp-cli checksum check and how to fix that issue.

i've installed wp-cli today, while testing i ran into one surprising issue. on `wp core verify-checksums' the following errors showed up: Warning: File doesn't verify against checksum: ...
1
vote
1answer
83 views

How WordPress is able to change locale without using setlocale

In my plugin I print out the current locales via $originalLocales = explode(";", setlocale(LC_ALL, 0)); var_export($originalLocales);die; Obviously the result is same as the WPLANGdefined. ...
0
votes
1answer
29 views

Shortcode returning localized HTML part

Here's my issue. I made a shortcode which makes a related article section in post content. Here's the content of this function: $a = shortcode_atts( array( 'id' => 0, ), $atts ); ...
0
votes
1answer
27 views

Force translated language on front

I'm facing a really simple issue : We made a theme for a multisite wordpress (see here : http://www.agence-malttt.fr/) and translated it with Loco Translate for French. It's still showing English ...
0
votes
1answer
82 views

failed to open stream: Permission denied warning while load_textdomain

While achieving localization of my theme, I am getting a warning: Warning: fopen(C:\xampp\htdocs/wp-content/themes/themename/languages): failed to open stream: Permission denied in ...
0
votes
1answer
43 views

Localized version offers upgrade to en-us version

My Dutch 4.2.5 version offers to update to WordPress 4.3.1–en_US when I visit the dashboard. I'm surprised that it does not offer an upgrade to something like WordPress 4.3.1–nl_NL Will this work ...
0
votes
1answer
35 views

Requiring Once into plugin PHP File not working

I am trying to get a php file to input content into the wordpress database under a specific table. I have set up the table and have verified that the information is passed into the insert.php file. ...
0
votes
1answer
29 views

Warning: The actual loaded translation content contains mixed textdomains and is not pure translateable within one textdomain

We're using the CodeStyling Localization plugin and getting this warning: Warning: The actual loaded translation content contains mixed textdomains and is not pure translateable within one ...
0
votes
1answer
53 views

Translating custom post type metaboxes

Is it possible to translate custom post type metaboxes (label not values of metaboxes fields) with localization? Or do I have to use some plugin like WPML? Thank you in advance. I have read this ...
0
votes
1answer
109 views

Plugin translation ready - mo file not loaded

I try to localize my plugin. in the plugin php file my-plugin.php I have the textdomain Text Domain: my-plugin and the action on "plugins_loaded" // load textdomain on plugin function ...
0
votes
1answer
53 views

Plugin translation not displaying

I have written a plugin to be translation-ready, and I have written a translation. As far as I can tell, the .mo files for the translation are loading correctly, yet the plugin is still displaying ...
3
votes
0answers
19 views

How to add i18n to a plugin's Twig template files?

A plugin I maintain uses Twig templates to produce HTML (and some other outputs). I've tried using __() within these (first adding the i18n functions with $twig->addFunction()) but it doesn't work. ...
2
votes
0answers
94 views

Singular name Plugin localization

I'm trying to localize the singular name of a custom post type. ... 'singular_name' => __('key', 'plugindomain') ... I created a .po and compiled it as .mo. I also loaded the translation using ...
1
vote
0answers
14 views

Some strings from a .mo file do not load

In a plugin I'm developing, most translations do work, but some strings refuse to work without an apparent reason. For a settings page, I'm using this pattern: $clgs_settings_descriptions = array( ...
1
vote
0answers
92 views

load_plugin_textdomain doestn't work with add_action plugins_loaded

I am trying to load localization for my plugin. There is directory called languages in my plugin folder with .po and .mo files inside of it. I have the following code in the plugin main file: ...
1
vote
0answers
21 views

localize elements in database

I want to localize my website with .mo files. Now, while it's pretty easy to scan existing php files and add the relative translation, it's not clear to me how to localize the elements in the db. I ...
1
vote
0answers
58 views

Different Custom Post Types for each Network site

I have a WP Network of two sites to use the Multilingual Press plugin ("Site-A" and "Site-B"). They both have a Custom Post Type, say "CPT-A", which I registered manually in functions.php. How do I ...
1
vote
0answers
310 views

Translating dynamic strings

In my form I have a dropdown. I'm getting the values and labels of the dropdown dynamically from SugarCRM via it's rest API. I would need to translate these strings. I tried to pass the dynamic ...
1
vote
0answers
221 views

How I can internationalize variables within the function _e () __ (), etc?

I have intro function variables and i wish internationalize dynamic. I have the follow code: _e($widget['description'], MyStaticClass::$i18n_prefix); When I run the poedit this ...
1
vote
0answers
31 views

Site does not display translations

I installed clean wordpress multisite. Bought a theme, installed woocommerce. Activated stuff, translated some and voila - everything is working. Translations and all. i then uplodaded all the same ...
1
vote
0answers
55 views

Wordpress Localization and Templating

I'm using Smarty Templates for the back-end and Handlebars for the front-end for the plugin that I'm building. It's only now that I discovered that the localization doesn't work when I declare my ...
1
vote
0answers
192 views

Wordpress translation loading english file

I am trying to translate a wordpress site but whatever I do the english file is always loaded. In functions.php I've set load_theme_textdomain('twentyeleven', get_template_directory() . ...
0
votes
0answers
16 views

I want to add a localization feature (region-specific posts) to my site, but how?

All of my users register for the site and therefore have author pages. I have language settings that they can set from that page. I'd like to add an option for them to select which province they're ...
0
votes
0answers
6 views

Change WordPress frontend language on link/cookie

I want to change the frontend language of my WordPress (single installation, no multisite) based on either a link the user clicks or an already present cookie. So I got the following language check ...
0
votes
0answers
25 views

How to correctly translate custom posts url rewrites?

I've got a custom post type 'product'. I've just added the rewrite option: 'rewrite' => array('slug'=>__('products','jungle'),'with_front'=> false) Fine. But I want mydomain.com/products ...
0
votes
0answers
26 views

I18n l10n of plugin does not show the translation

I tried to Internationalize I18n one of free plug-ins (after 7 hours of trial I decided to ask for help). But I'm not able to get translations displayed. What I did: inserted the definition of text ...
0
votes
0answers
12 views

WP Localization error within return value

I have some code in my function panel and when I try to make it localized, I always get it wrong. Here is the code and I just want to localize the "Read More" words: return '<a href="'. ...
0
votes
0answers
39 views

Wordpress i18n functions only works if language is set int wp-config?

Basically all the functions listed here: https://developer.wordpress.org/themes/functionality/internationalization depends on the wp-config? The locale is the language code and/or country code you ...
0
votes
0answers
55 views

How to build a multiple country WordPress site - pages, posts, and categories for each country?

Is there a best practice in building a multi-lingual wordpress site? There will be multiple content types and taxonomies that will need to be filtered by country. By default the site will display ...
0
votes
0answers
30 views

GUID to related post not in current language

I'm having problems with related posts and the link to them. I'm using the plugin Posts 2 Posts to create connections between posts. I also have three languages in wordpress website (french, ...
0
votes
0answers
16 views

What is the best way to localizing plug-ins stylesheet

I need to localize some WP plug-ins and like to know if there was a method to make a rtl.css for plug-ins like the way WP handles RTL theme by reading rtl.css. What should I do to prevent my changes ...
0
votes
0answers
23 views

Using a class to store i18n strings for global use in plugin

The following works, but I'm wondering if it's a sensible way to create i18n strings for use without my plugin: class Global_Strings { // property declaration // method declaration public ...
0
votes
0answers
125 views

Custom theme .mo translation file not working

I have a custom .mo file named ne_NP uploaded in the languages directory. Nepali language is enabled with qTranslate and define('WPLANG', 'ne_NP'); is in wp-config.php as well. Yet the theme ...
0
votes
0answers
42 views

Blank strings in localization .po files?

I was looking through Jetpack, Nextgen, and Wordpress plugins to get some examples of using localization. Oddly enough it seems quite common to have blank strings in some cases. For example, in ...
0
votes
0answers
61 views

Extract all strings in web site to send to translator

I need to extract all translatable data from wordpress to PO files in order to send it to a translation agency. Of course, I also need a mechanism for putting the translated text back, and extracting ...
0
votes
0answers
18 views

How to translate default wordpress files?

On my website almost everything is translated as it should be. Only some items can't be translated inside the theme or plugins. For example: days, weeks, months is a part of a plugin which is not ...
0
votes
0answers
58 views

How to get rid of unnecessary plugin localization files?

There are some plugins with so many translations (e.g. Slim Jetpack has 45 -- 10 MB!) that the .po and .mo files take more space than the plugin itself. And I know I will never use these translations, ...
0
votes
0answers
20 views

Whats a good strategy for localising WordPress post and page content?

I'm aware of the various functions for localising elements of themes and plugins - __(), x() and the textdomain concept but how does one go about providing localised versions of actual post and page ...
0
votes
0answers
917 views

How to dynamically change the locale?

Sorry about making this so lengthy. I just want to explain everything clearly and walk you through what I have tried so far to solve this problem. There is an English and a Spanish version of the ...
0
votes
0answers
41 views

Tweak the loop for translation

I am building a custom solution that would be bilingual in English and French. I want to store the French content, title,... in custom metas by adding META BOXES to the edit screen. This part is fine, ...
0
votes
0answers
89 views

Wordpress Media Uploader error messages localization on frontend

I'm working with ru-RU wordpress vertion. I've faced with issue that I can not get russian error messages on custom media uploader on front end. This error strings media uploader get from ...
0
votes
0answers
160 views

Gettext for custom field checkbox values

I have a custom field (created with ACF) that allows the author to choose from several options (in admin) and where these choices are displayed on the front-end. The code producing the custom field is ...
0
votes
0answers
76 views

language theme and multisite

i have a problem i can't solve, i made a theme with two languages support, italian as standard and english using the .po and .mo files (located in the /lang/ folder inside the theme), everything works ...
0
votes
0answers
69 views

Wordpress NavXT plugin localization

My situation is as follows: 1) I am using wordpress 3.6.1, and I have the Breadcrumb NavXT plugin installed. 2) I have a custom theme, and the localization file is on the following path: ...
0
votes
0answers
46 views

Internationalization of Blog Posts

I have 4 domains all pointing to the same server with a server alias. They are like australia.com, america.com, china.com etc. So i have a domain for a couple of countries. I run a WordPress blog, but ...