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)

1
vote
2answers
453 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
205 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
229 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 ( ...
5
votes
1answer
3k 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
178 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
128 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
107 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
196 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
105 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
147 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
42 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
208 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
180 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
78 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
169 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
499 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 ...
7
votes
5answers
8k 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
4k 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
171 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
76 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
39 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
201 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
151 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
569 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
954 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
493 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
3k 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
265 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
405 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
79 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
129 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 ...
0
votes
1answer
1k views

How to translate multi-line strings?

If there is a long string in PHP like this: <?php $text = "Some ... very very... long string"; Can it be localized by GetText wrapping it in __(), e.g. <?php $text = ...
5
votes
2answers
1k views

How to provide translations for a WordPress TinyMCE plugin?

I know that I can get my translations into JavaScript doing: $MyTranslations = array( 'translation1' => __("Some String 1", "MyTranslations"), 'translation2' => __("Some ...
1
vote
1answer
126 views

How do I amend the fixed “author” part in the URL?

I am creating a localized instance of WordPress and one can easily configure the category and tag parts of the URL but I cannot find anything similar for authors. So for instance I get this: ...
0
votes
3answers
976 views

Internationalize plugin so strings can be translated in WPML

A third party developer made a text widget with title, body and thumbnail. This accompany widget plugin has not been internationalized and therefore the strings do not appear in WPML's string ...
0
votes
2answers
162 views

Problem with adding a new post type

I want to add a new post type i have a php file (posttype.php) at : wordpress/wp-content/themes/ this is the code : <?php // Add new post type for Recipes add_action('init', ...
2
votes
3answers
2k views

add spans and characters into paginate_links

I am using paginate_links on my custom page query. What I have already works sweet and this is the code I have so far... <?php global $wp_query; $big = 999999999; // need an unlikely ...
1
vote
1answer
66 views

sprintf bloginfo odditie

Why the disco funk this is happening I can't quite put my finger on - but I guarantee you it's because I'm probably missing some simple PHP best-practice: <?php echo '<h3>' . ...
2
votes
3answers
4k views

Wordpress multisite,one theme,and different languages?

I'm not sure is this possible,for example I have english,french and italian blog,they all use same theme,I just want when visitor is on french site for example to display date,(some strings like ...
5
votes
3answers
597 views

Localization: I want the backend: english and frontend in defined language

I'd like to have the backend of Wordpress in English and use a different locale for the frontend so far I figure out perhaps I could do it by setting in the wpconfig the locale I want to use in the ...
1
vote
5answers
2k views

Proper way to create / manage gettext (.po, .pot) files?

So I'm trying to figure out how .po and .pot files work, seeing as this is what Wordpress seems to use. But I can't wrap my head around it. I get that a .pot file is a template file that indicates ...
2
votes
1answer
319 views

Adding another arg to comments_popup_link

what WordPress core functions do I have to modify to change comments_popup_link('Ni komentarjev', '1 komentar','% komentarjev') to comments_popup_link('Ni komentarjev', '1 komentar', **'2 ...
0
votes
1answer
1k views

Change language of comments template

I have a Wordpress installation in italian, I need to keep italian for the admin section but the frontend needs to be in english. The theme is custom so that's ok, but in single posts I'm using ...
5
votes
4answers
4k views

Theme localization of “slugs” (custom post types, taxonomies)

in my theme I want to define a series of custom post types and custom taxonomies, each one having its own customized slug; the base language of my theme is english, therefore the slugs will be in ...