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)

0
votes
1answer
842 views

How to load theme textdomain from plugin?

I built a simple localization plugin to suit some specifications needed by my orgnanization. For each language there is a single .mo file that contains both the theme translations as the page content ...
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
1answer
31 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 ); ...
3
votes
0answers
21 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. ...
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
1answer
23 views

Translate custom order status through a filter?

I'm using this plugin to customize order statuses in Woocommerce: Woocommerce Order Status Manager In documentation it says I translate order status name using the following filter: ...
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
2answers
152 views

Changing interface language without multisite

I want to change the Theme's interface language without making multisite by passing langauage parameter into the URL. <a href="<?php echo home_url('/')?lang=bn ?>">Bengali</a> My ...
0
votes
0answers
27 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
2answers
901 views

Why is setlocale() returning false on WPEngine?

It appears that WPEngine does not have support for different locale strings, rendering setlocale() useless. setlocale(LC_ALL, "es_ES"); returns false and immediately after that, setlocale(LC_ALL, 0) ...
0
votes
1answer
22 views

Change localization only for plugin

I have a wp plugin with the required .pot and .mo localization files. Everything works fine, if I change the wordpress language, the plugin language changes too. But some users has requested if I ...
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
1answer
28 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 ...
9
votes
1answer
6k views

How to make a WordPress plugin translation ready?

What is the best way create a plugin that is translation ready? It doesn't have to be translated from the beginning but it has to be easily translatable so fellow developers from different cultures ...
1
vote
1answer
43 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 ...
0
votes
1answer
18 views

using Options Framework - can “theme-textdomain” domain be changed?

I'm using the Options Framework in a new theme. I would like to use the theme name as the domain for the localization functions such as __() and esc_attr(). But the localisation functions in the ...
-1
votes
1answer
542 views

Replace woocommerce | (pipe) separator in product variation to , or another character?

How to replace Woocommerce | (pipe) separator in product variation to , or another character? I use Cyrillic keyboard layout and there is no pipe symbol. To enter that symbol I have to switch to ...
0
votes
1answer
85 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 ...
1
vote
1answer
42 views

Using WordPress gettext functions in a library outside plugin or theme scope

If I have a library available through packagist that could be used in WordPress plugin or theme development, how should I address multilanguage support if I have a few strings that could be localized? ...
1
vote
1answer
160 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, ...
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
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 ...
2
votes
2answers
517 views

WordPress 3.8 keeps asking me to upgrade to 3.8

It began with version 3.7.1: You are using WordPress 3.7.1. Update to 3.7.1 I've installed and usually update WP with git from https://github.com/wordpress/wordpress: cd wordpress git fetch ...
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
0answers
40 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
1answer
30 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
54 views

load language file

I want to load my French language file into my Arcade Basic theme. There is a language file, arcade.pot, and I translated it using PoEdit. I don't know how to add it, there is a function, in ...
5
votes
2answers
67 views

Use __($str) and _e($str) to translate strings with HTML

I'm currently developing a non-trivial theme right now, most of the time I'm not using a __($str) translate function when there's an HTML tag therein the text. Is it good to always use the translate ...
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
31 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 ...
11
votes
5answers
10k views

How to create .pot files with POedit?

I've spent hours today on what seemed like something really simple, which is to create a .pot file for a Wordpress theme that I'm creating. I've read the Smashing Magazine article, the Tutsplus ...
3
votes
1answer
107 views

Secure my “add_settings_field” translation?

I am using "add_settings_field" and want to provide translation for it , but my problem is security. So is __('My Checbox:' , 'domain') secure enough for translation? If not what can I do about it? I ...
2
votes
1answer
63 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 ...
3
votes
2answers
109 views

What are the most used WordPress localization?

I wonder, what languages are most used in WordPress? I want to translate my plugins to these languages and can't find what they are. Are there an official statistics somewhere? Thank you!
0
votes
1answer
97 views

Wordpress Theme .mo-file won't load

I am developing a theme that implements multiple languages. I have a few strings that will have to be translated in the theme itself. I would like to use a .po and .mo file. For some reason, when I ...
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 ...
1
vote
1answer
42 views

Should shorcodes in i18n plugins be translated and if so, how?

Internationalizing a plugin with half a dozen shortcodes like: function plugin_show_schedule( $atts, ) { extract( shortcode_atts( array( 'type' => __('week', 'mz-mindbody-api') ...
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
1answer
114 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 ...
1
vote
2answers
75 views

How to change i18n/l10n of #reply-title? (Old title: Comment reply link not working)

I'm developing a new theme and plugins for it. Unfortunately, the comment reply link is broken. Instead of moving the comment reply textarea, the page is reloaded by adding e.g. ?replytocom=2#respond ...
0
votes
0answers
126 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
23 views

Making a string translation ready (with some html in it) [duplicate]

A simple text string is made translation ready as: _e('Simple string','textdomain'); But how to make the string translation ready with some html in it, eg: simple string with a <a ...
1
vote
1answer
23 views

How to Internationalize Wordpress - Extract strings with textdomains, per textdomain individually

I spent several hours searching, and have not found a solution, how to extract Strings dedicated by Textdomain from a PHP File (in a wordpress plugin): In my plugin and theme I use for example ...
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: ...
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 ...
3
votes
2answers
170 views

Can we use a variable hook for language string?

I am using this to localize strings in my theme __('Background image', 'themename'); there are plenty of strings that are localized but to make sure that the theme lang files and localization ...
0
votes
1answer
54 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 ...