We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [localization]

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.

Filter by
Sorted by
Tagged with
0
votes
1answer
9 views

Why does my WordPress Upgrade version have a language suffix?

In My WordPress dashboard at update-core.php, it says: An updated version of WordPress is available. You can update to WordPress 5.3–en_GB automatically: [Upgrade button] (This ...
0
votes
1answer
17 views

WordPress add_filter to post_date

I using a plugin that it makes posts and etc date to Persian Date but the problem is I just want to convert date in front not admin panel or etc. I found that part make this action: add_filter('...
1
vote
1answer
33 views

Headless Wordpress: How to authenticate front end requests?

I am envisioning Wordpress on the back end to work with React.js on the front end like this: Wordpress is installed on http://example.com/api React.js script is loaded into http://example.com/index....
0
votes
0answers
49 views

How to add “er” after particular days of the month in php?

I am working on a html/php code as shown below: <?php if(ICL_LANGUAGE_CODE=='fr'){ ?> /* When the page is in French */ <time datetime="<?php echo esc_attr(date_format($ts, 'H:i d-m-Y'...
0
votes
0answers
20 views

date_i18n in wordpress/php

I am working on a html/php code as shown below: HTML/PHP Code: <time datetime="<?php echo esc_attr(date_format($ts, 'H:i d-m-Y')) ?>" data-timezone="<?php echo esc_attr($tz_param) ?&...
0
votes
1answer
83 views

rest api endpoint - accept diacritic characters

I am trying to register a custom endpoint, which will accept diacritic (accent) characters, so that I may search it in french. This is what I have tried: register_rest_route('events/v1', '...
0
votes
0answers
19 views

How to sync updated translation file with old custom one

I have customized the translations of Wordpress admin In 4.9 version. When I updated WP to 5.1, new strings are not translated with the old .po file. So I updated the tranlations after backing up ...
0
votes
2answers
24 views

Localize plugin name

Plugin name is a comment in WordPress. Since you can't write php code in the comments, is there a way to localize the plugin name and make it translatable?
0
votes
1answer
43 views

How to disable gettext feature?

Just trying to entirely disable localization support of a site. Tried removing the gettext-filter, using override_load_textdomain-filter, and looked into every possible site with no luck. Can this be ...
0
votes
1answer
35 views

Wordpress in French Language [closed]

I am migrating a French wordpress website. After completion the website keeps displaying special characters, specially the black diamonds with white question mark inside �. I have installed the PO ...
0
votes
1answer
47 views

I dont know why my localization is not working

I am working on a Plugin for Wordpress and I'm not able to get the Internationalization working. Here is the GitHub Link: https://github.com/dev-nm/WP-StudioLink-Integration I used wppb.me as a ...
1
vote
1answer
80 views

Should I change text-domain of TGM library inside theme?

I created a theme and I want to publish it in wordpress.org. I used TGM library to check to require plugins. but the Theme-check get bellow warning: Warning: More than one text-domain is being used ...
0
votes
1answer
13 views

How to set different localization file for different users?

I am trying to load localization file depends on users settings. Is this way is correct or there are better ways to implement locale changing depends on user settings? <?php ...
0
votes
1answer
18 views

Localisation and Wordpress

So I'm setting up translations for a website based on locale. But it seems like Wordpress is determining this with the language as set in the Admin. How do I set up a localisation so that if I'm in ...
0
votes
1answer
49 views

gettext localization is not working

I'm trying to translate the post date using __() function. But it is not working. The post date still displayed in English. What are you the other options to localize the post date(posted-on). ...
0
votes
1answer
263 views

Can't translate the post meta data (Date) in another language

I want to translate the post meta data (date) in chines language for example, September 13, 2017, should be translated as 2017年9月13. But my code gives it in English. Do you see any error? Please help. ...
0
votes
1answer
380 views

WooCommerce does not translate every string

So I have an issue with WooCommerce translation to German language - basically it does not translate every single string. I'm using a child theme of "Neighborhood" theme and we have a plugin Loco ...
3
votes
2answers
36 views

Problems with localization

I'm creating a plugin and I've put: define ('WPLANG', 'it_IT'); into wp-config.php file. After plugin Name in the Header of the Plugin declaration: * Text Domain: endpoint * Domain Path: /...
0
votes
1answer
770 views

Can't Change WooCommerce Default Language to Spanish (Mexico)

Going a bit mad here on how complicated they have managed to make changing the language in WooCommerce. My site is in Spanish (Mexico), interface admin is in Spanish.I have also managed to set ...
1
vote
1answer
323 views

Change locale by detecting viewer's browser language setting and let them choose prefered language after

I am coming from a multi-linguo country, and viewers may speak different language. I am writing a theme and I noticed that the language of my theme only changed based on the setting of my admin panel,...
1
vote
0answers
73 views

What can be reason for no plugin-strings available under stable section on translate.wordpress.org?

I cannot see any plugin-strings under the stable section on translate.wordpress.org. What can be reasons for that? P.S.: Under development section, I can see all the plugin-strings.
2
votes
1answer
26 views

What is the way to ship read-me strings like plugin-strings for internationalization?

I want to translate my plugin for non-English languages. But for readme strings, I could find the only option to submit translations over translate.wordpress.org. Is there any way like the one ...
0
votes
1answer
317 views

.PO file is found but I don't see translations: how to debug the problem?

I have installed the Stack theme, and I want to make Danish translations. I have downloaded the Stack.pot file, made the modifications I need, and uploaded them to: /wp-content/themes/stack/languages/...
0
votes
0answers
38 views

Interface translation without plugins

EDIT 2: I am planning to implement a language switcher, but I don't have a clear understanding of how interface translation works in WordPress out-of-the-box, without multilanguage plugins (I don't ...
0
votes
0answers
26 views

Menu names not getting translated

I've got the following code in a theme to register two menus: register_nav_menus( array( 'primary' => esc_html__( 'Primary', 'text-domain' ), 'secondary' => esc_html__( 'Secondary', 'text-...
1
vote
2answers
471 views

Wordpress theme with frontend in different language than backend?

I have added the po and mo files via Poedit for Chinese to my wordpress site. I would like to keep my backend in English. How can this be achieved? Is this possible without using a plugin such as ...
0
votes
2answers
147 views

Translation issue with global variables

I'm creating a plugin that supports internationalization. Everything is working fine, except for global variables. Strings in global variables will not get the appropriate translation. Explanation: ...
0
votes
1answer
39 views

Ajax WordPress pass post URLs

I'm using wp_localize_script to send post data to ajax. wp_localize_script( 'my-script.js', 'ajax_object', array('ajax_url' => admin_url('admin-ajax.php')) ); add_action( 'wp_ajax_load_more_posts',...
0
votes
0answers
41 views

WPLANG option not available in localhost

In my website which is multi-site, sub-directory, XAMPP based and hosted in local machine "WPLANG" option is not available for any site. But its available in azure based wordpress. Is there anything ...
1
vote
2answers
489 views

Translated strings not appearing - what am I missing?

I've looked through all the similar threads I can find, and I think I should have all the pieces in place to have translated strings appear, but they are not. I'm about ready to pull out my hair! ...
0
votes
0answers
70 views

How do I make this plugin translation-ready?

I am in need of help with making a plugin translation ready. I do not have any experience in doing this what so ever, nor in php... If anyone could help, it would be much appreciated. This is the ...
0
votes
0answers
146 views

How to generate a rtl.css file for themes?

I'm developing a theme and would like it to support RTL languages. I'd like to automatically generate a partial RTL file, that is, with only the relevant selectors flipped, but every tool I've tried ...
1
vote
0answers
14 views

Single translation for many locales

Greetings to everyone, Is it possible to do make a single translation for many locales? Let me explain it better: Can I create a single translation file for my theme called es.po and es.mo so it ...
0
votes
1answer
44 views

How to localize something coming from theme customizer

<p><?php echo get_theme_mod('simplisto_p'); ?></p> something is saved in the database through a theme customizer and then pulled through get_theme_mod. My Question → How to ...
1
vote
1answer
38 views

Is there a way to test that readme looks in other language before submitting translation?

I am adding the translation for my plugin's readme file in Spanish. I want to check if there is a way to test how my file will look on Wordpress site's page before submitting the translation?
0
votes
1answer
65 views

Can I set Wordpress to display languages based on system language without a plugin?

This question seems extremely straightforward, but hours of googling have led to no results. Here's the basic gist: I am building a site for Japanese viewers, and am using the theme's language folder ...
1
vote
0answers
165 views

How to register javascript variables in wp_localize_script?

When translating PHP-strings with variables, I use the following approach: sprintf(__('Some text <b>%s</b>, more text.','my-plugin' ), $somestring); When translating javascript strings, ...
-1
votes
1answer
562 views

How to use esc_attr__() function properly to translate a variable that contains string?

I am trying to develop a theme and trying to escape a string using esc_attr__() fuction. Here is how I implemented it. $title = stoic_get_the_site_title(); echo esc_attr__($title, 'stoic'); But ...
0
votes
1answer
66 views

How to ignore extra whitespaces in translation functions like _e?

I am passing few big strings in my code for translation to _e(). These strings were earlier broken into multiple lines with few leading white spaces before every line to maintain indentation & ...
1
vote
1answer
316 views

Should I always prefer esc_attr_e & esc_html_e instead of _e?

I am working to internationalize my plugin. As I can see on Wordpress site about esacaping, it says you should always use it. But as I can see in many popular plugins, they have used _e instead apart ...
0
votes
1answer
498 views

Can't we use strings defined as PHP constants if we want to translate them in a plugin?

I want to translate constant strings in my plugin defined as: define( 'CONSTANT', __( 'string-A', 'textdomain' ) ); And later using it somewhere like: $x= '<h4>'.CONSTANT_NAME.'<h4>'; echo ...
0
votes
1answer
19 views

How to prevent someone from entering strings without making it available for translation?

I am working to make all strings in my plugin ready for translation by putting them under __() or _e() as per requirement. Now in future to avoid others in my team to add strings without making ...
0
votes
0answers
71 views

Translation not working for Constant strings in Plugin

I want to translate constant strings in my plugin defined as: define( 'CONSTANT', __( 'string-A', 'textdomain' ) );. The 'string-A' is available for translation and I have uploaded the mo files in the ...
1
vote
1answer
146 views

Is it possible to set a different frontend- and backend-language?

my WordPress site is currently set to "English". I like the back-end to be completely in English, so it is easier to follow tutorial instructions etc. However, the front-end must be in German due to ...
0
votes
2answers
69 views

Is this really always bad? (variables in l10n functions)

I needed to translate strings on another language than the current $locale, so I need to change the locale and restore it later, and I really couldn't repeat all the code for the 30++ strings I had to ...
1
vote
1answer
447 views

Why isn't my custom post type archive URL translating?

I've god a 'wine' custom post type, created with rewriting options: 'rewrite' => array( 'slug' => __('vini', 'fdr'), 'with_front' => false, 'pages' => false ), So the slug should ...
2
votes
0answers
75 views

How does WordPress choose which translation file to use?

One of my WordPress plugins has ended up with 2 different sets of translations for the same exact language (Spanish)... there's the one set of .mo/.po files I bundle with the plugin itself, and ...
-2
votes
1answer
106 views

How to change text depending on the country

a few texts fields on the site need to be different in one specific country on (Category & Custom home page) Eg: Class 1 (India) Grade 1 (UK) First Grade (US) Any idea on how I could do this ?...
4
votes
3answers
927 views

Locale filter in conjunction with new datepicker localization

So in WordPress 4.6 they added the localization to the jQuery datepicker to be automatic. I am posting here first because I am not sure if this is actually a bug with WP or if I am doing something ...
2
votes
1answer
156 views

POEdit with Custom mu-plugins code

I have a very strict directory structure I must adhere to within mu-plugins, but I would like POEdit to be able to help me generate translation files for specific code within this structure, while ...