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
1k views

Shortcodes, output buffering, and WordPress functions

I have a couple of long forms which I want to output as shortcodes. Shortcode API indicates that If the shortcode produces a lot of HTML then ob_start can be used to capture output and convert ...
1
vote
2answers
419 views

Mapping Subdomains in Wordpress to give the appearance of a localised site, best approach?

I am building a classifieds website and am using Wordpress for the functionality of user accounts, Paypal integration, custom taxonomies and of course super flexible custom post types for the ...
0
votes
1answer
817 views

Redirect user on first visit based on geographical location

My project has two versions of the website - American and International. This is not localization, language is same, only content changes. I have created subdomain for the US version and kept ...
2
votes
2answers
96 views

Should i use _n for pronouns in translation?

I use _x() now! I accepted the answer just because he understood right and was first. So don't get confused! $like_me_on = __('Like me on %s', 'my-plugin'); $like_us_on = __('Like us on %s', ...
1
vote
0answers
163 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
1answer
68 views

Display Today's date outside the loop?

Is there any way to display the Today's date outside any loop/post using WordPress date/time function instead of using the PHP date() function? I'm using the PHP date() function but it does not ...
0
votes
2answers
110 views

How to update the language used by wordpress from a plugin

I'm trying to create a plugin that will be able to translate language used in wordpress. Here's my current code: add_action('plugins_loaded', function(){ load_plugin_textdomain('ecom', false, ...
0
votes
1answer
76 views

Do I need to include a textdomain if my theme doesn't support translation?

According to the codex Themes are required to use theme-slug (or a reasonable facsimile) as textdomain for translation Does this mean that my theme needs to include a textdomain even if my ...
1
vote
1answer
200 views

Strings including html for localisation

How to localise this string (including html) ? echo "<div class='updated'><p>All options are restored successfully.</p></div>" ; Is this correct? echo '<div ...
1
vote
0answers
111 views

What would be the correct way to manage a multiple locale site with Wordpress [closed]

We are a professional company with lots of big clients and have adopted Wordpress 2 years ago to build professionnal grade websites. Being locate in a multiple language country, we have to make our ...
0
votes
1answer
165 views

WordPress Translation to french, at -> à not working

I have a german / french blog. I installed the german WordPress version, so I already had de_DE.mo and de_DE.po in wp-content/languages. After I realized that the content of a comment's ...
4
votes
1answer
188 views

localize inline css

I'm providing a theme setting to define a group of images for the frontpage background. On page load, I want to pick an image at random from this pool. My approach is to add a line of inline CSS ...
4
votes
3answers
827 views

Running WP Cron on specific local time

The scenario is to run insert_post function every midnight (00:00) of local time. Must run daily on weekday. function add_daily_task(){ if((date('l', time()) != 'Saturday') || (date('l', time()) ...
1
vote
2answers
494 views

variables in translatable text

I am adding a list of suggested plugins to my theme using TGM Plugin Activation - https://github.com/thomasgriffin/TGM-Plugin-Activation/ However, when I run theme check, about 40 or so ...
4
votes
1answer
219 views

Using plural-only translation of register_post_status() in plugin

tl;dr: My plugin wants to translate strings from core or other plugins that use _n_noop(). How? This question related to this plugin and is sort of a follow up to this question. My plugin adds ...
1
vote
1answer
245 views

Action hook load_textdomain $domain variable

I use the load_textdomain action hook to list all active localization text domains with corresponding path to translation files. function mo_location( $domain, $mofile ) { if ( ...
7
votes
1answer
4k 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 ...
6
votes
2answers
197 views

Can I leave off plugin textdomain for terms used in core?

I've got a plugin that puts post statuses into post type admin menus. I'm in the middle of internationalizing it, and I'm wondering how to handle this situation. The plugin uses some unique strings ...
1
vote
4answers
130 views

Plugin for single language localisation [closed]

I have found dozens of plugins which helps you to translate a Wordpress website into different languages. However, I cannot find anything that would help me localise Wordpress for different regions, ...
1
vote
2answers
108 views

Two language versions for each article

I have a Wordpress website that needs to be available in two different languages. We have the articles written in both languages already. I've seen a lot of solutions providing automatic ...
0
votes
1answer
41 views

How to create some sort of word mapping?

I would like to know how I could create a file in which I could associate a word in multiple languages. Let's make an example in XML: <item key="goodMorning> <copy lang="en">Good ...
0
votes
1answer
26 views

Localise settings section headline

Assuming i've got a bunch of setting sections. I add these sections to my plugin page in the following way. $sections = array('notifcations', 'updates'); foreach ($sections as $section) { ...
0
votes
2answers
213 views

Where to modify translation files by _e()

I am in a rush right now and can't seem to find the answer i"m looking for. I have a wordpress website that has english and french versions. I see it is using Multi site language switcher to flip ...
1
vote
2answers
123 views

How to i18n text coming from the db or from an external source

I'm writing a plugin and i wanted to i18n correctly text which i'm storing in the db or in an external file. How should i do that?As of now we are generating pot files with wordpress and so all the ...
1
vote
1answer
167 views

How do I translate this string - PHP syntax question

I need some help on how to correctly format this code snippet for translation: <?php next_post_link( '%link', __( '<span class="meta-nav">←</span> Nästa nyhet') ); ?> I've used ...
1
vote
2answers
43 views

Internationalization and functions that use it

I'm building a new design into WP and so technically it is a theme, however it is only a design for one site and won't be a theme anyone can use and hence I don't want to bother with ...
1
vote
2answers
243 views

How to prepare SimplePie_Item's get_date() for l10n?

I'm trying to improve the localization of the Bones theme. On the admin side it provides an RSS widget which uses the following code: <?php echo $item->get_date('j F Y @ g:i a'); ?> ...
0
votes
1answer
31 views

What are these variables and where are they documented?

This is in the twentyeleven theme. Can somebody tell me what this is? <span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ) ^^^^ ^^^^ My best ...
6
votes
1answer
192 views

Gettext details

I've got a few gettext() questions that are not covered anywhere in WordPress Codex but I think they are important. __('string') in THEME should be used for strings that are likely to be present ...
0
votes
1answer
2k views

Localization Problem: Doesn't Display Translated Words

I'm trying to localize my plugin and with a plugin called CodeStyling Localization, I succeeded to create a .po file. However, the words used in my plugin remain in English although the default ...
2
votes
0answers
81 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 ...
3
votes
1answer
176 views

What is the purpose of an extra file for translation?

What code is required to put in functions.php in order to make the theme translation ready? The TwentyEleven theme has only following line: load_theme_textdomain( 'twentyeleven', ...
8
votes
3answers
539 views

What's the point on gettext syntax?

So far I've been handling some translations in Wordpress and tried to read the official gettext documentation but won't get the point of one maybe simple thing: What's the differences between those ...
8
votes
5answers
12k views

How to translate a plugin via .po .mo?

I want to translate this plugin. This plugin already has translations to some languages, and it has .pot file for adding new languages (as far as I understood from description). Although I never had ...
7
votes
1answer
5k views

How does printf( __( ) ); work?

Today I work through a theme to get a better understanding of WordPress and templating. I discovered this: <?php printf( __('Designed by %s', 'Anyword'), '<a ...
2
votes
1answer
197 views

Use a language specific thousand separator

I have a views counter on each post. When it reaches for example 1000, it adds a dot as the thousand separator, the result is 1.000. This is odd in my language, I should have a space as separator or ...
0
votes
1answer
79 views

Tool bar in editor missing in WP

I am having somewhat amazing problem. My client is in sweden. When I check the site from my country (Nepal), everything is fine. But tool in editor in wordpress panel is missing in sweden. I checked ...
0
votes
1answer
40 views

wordpress localization extending

I am using a .mo file in my language directory of wp-content. But It doesn't trnslate some words and all the numerical contents of the site. How can I add these to the .mo file? Or is there any other ...
8
votes
2answers
231 views

Translate a string to a language with masculin/feminine nouns

So in english we don't have gendered nouns. It is always "a table" or "a desk" with no need to worry about it being "une table" or "un tableau" (french). So my question is that when working on the ...
1
vote
1answer
160 views

How-to Change Content with location change?

I have to develop a site using wordpress having thousands of pages. Pages will have the same content but there will be change in the location of the content. For example location will be Sydney, ...
1
vote
2answers
1k views

How to set up Wordpress in the intranet?

I have been looking for an answer for long time now and have tried on a few alternatives too, but still I am unable to do it. What? : I want to set up Wordpress on the intranet in my workplace most ...
1
vote
1answer
647 views

Multisite WPLANG won't save

I have a multisite workpress install (v 3.3.2). I'm trying to save the WPLANG field but nothing happens. I get the confirmation message "Site options updated", but the field is still blank. And ...
1
vote
1answer
1k views

Why load_textdomain work but not load_plugin_textdomain?

In my plugin's init function load_textdomain( 'myplugin', ABS_PATH_TO_MO_FILE ); // OK load_plugin_textdomain( 'myplugin', false, ABS_PATH_TO_LANGS_DIR); // No effect echo( __('Test', ...
1
vote
1answer
555 views

Localized Date Format for Custom Field

I'm using a custom field, formatted with "dd-mm-yyyy". I would like to use it with the Date Format defined in the Dashboard settings. It seems alright in English with get_option('date_format'); Or ...
1
vote
2answers
4k views

Change locale at runtime?

I wonder, is there a way to change the locale at runtime using WordPress ? What I mean, is, I have create a custom URL in order to create an XML file with data for integration with another web ...
1
vote
2answers
272 views

Cart66 localization hardcode strings [closed]

I've read the documentation http://cart66.com/cart66lite-documentation.pdf and searched on google but i can't seem to find a location(s) to localize strings (hardcode) for Cart66. If someone can ...
1
vote
1answer
43 views

2 localizations inside a WordPress theme

I'm building a theme which includes a separate "section" and I want to make both the theme and the separate section localizable. However, I don't want to have them under the same textdomain. Would ...
1
vote
1answer
468 views

_n() Single and Plural for search results?

This code produces Search Results for "hello" - 1 articles " <h3>Search Results for <?php echo'"'?> <?php /* Search Count */ $allsearch = &new ...
1
vote
1answer
80 views

Localiztion in javascript

Wordpress currently uses the gettext feature which is available in php but unfortunately not in Javascript. I have searched this matter on the web and have come up with this trick. But there is a ...
0
votes
1answer
130 views

How to localize built-in strings in a future-proof manner?

I need to amend the labels for name and email fields in the comments form in my localized (Czech) Wordpress this way: Emailová adresa => Email Webová stránka => Web What I did is ...