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
14 views

Transform internationalized plugin into internationalized mu-plugin?

I developed a custom plugin with the following structure in my folders: wp-content --- plugins ------ my-plugin --------- languages ------------ po and mo files --------- my-plugin.php I ...
0
votes
1answer
89 views

String translation within WordPress multisite with i18n not working on all sites

Using WordPress Multisite (subdir) Child themes Loco Translate The Issue One of our multisite sites isn't string translating (Japanese). We started with non-multisite with just English. Then, ...
1
vote
1answer
29 views

Plugin translation not working apart from name and description

I wrote a plugin that creates a custom post type and I tried to translate it using Poedit, but it's not fully working. I did translate a few other plugins before and I'm not sure what's causing this ...
2
votes
2answers
126 views

How should you internationalize javascript spread in multiple files but build in one?

I have followed the instructions for internationalization on: https://developer.wordpress.org/block-editor/developers/internationalization/, but it doesn't seem to play well with the development tools ...
0
votes
1answer
15 views

Get localized user roles

I have a settings page that shows the users wordpress role. I am using wp_get_current_user()->roles get that list. However, that list appears in English, and often my users have their locale set to ...
0
votes
0answers
16 views

How to get the total number of posts (in PHP) and pass it to Javascript?

I have an AJAX call that pulls the next page of posts on my home.php template. Now I want the total number of posts as a variable in the javascript file, so that I can use it in an if-statement to ...
1
vote
1answer
35 views

Gutenberg block JavaScript localisation on Polyglots does not work

I can successfully translate my plugin using wordpress.org for all php strings. Everything is fine. I can even see the strings that needs translation on https://translate.wordpress.org/projects/wp-...
0
votes
1answer
30 views

Decimal values via get_option() with custom local (decimal point = comma)

I have a tricky bug in a plugin and I'm trying to figure out who's fault it is. The plugin uses in its init method a check if the DB has to be updated. And the child theme I'm using has set a custom ...
0
votes
1answer
46 views

How to become a translator on wordpress.org?

I tried to find the solution on WordPress.org, but to me as a new contributer, the documentation seems confusing, and links like "Become an editor." in the "Translation Editors" on a plugin's ...
0
votes
1answer
210 views

How to allow single quote with esc_html__() without sprintf()

Because of security reasons we are of course required to use esc_html__() for WP development. This is annoying because if you'd want to pass a single quote into your strings, you'd have to use sprintf(...
1
vote
0answers
23 views

Unable to find where to translate certain tooltip string

I am working with the Store Shopline theme on Woocommerce, and am trying to set up a version which is localised to German. This is going ok, however, I can't seem to get a hold of the text string ...
3
votes
1answer
35 views

How can I translate the name of my Plugin for other languages?

How can I translate the name of plugin for other languages? For example: When Wordpress is in pt-BR language, the plugin would be "Meu plugin". If the Wordpress is in en-XX language, the plugin name ...
0
votes
0answers
43 views

Is it possible to use multiple post_name, post_title and post_content?

I'm actually writing a localization plugin. Here I have developed something like "localhost/post-title", "localhost/de/post-title", "localhost/ru/post-title". From this point on, is it possible to ...
0
votes
1answer
31 views

Translation from .mo file not working in theme

I'm trying to add translations to my theme. I went through the documentation and many questions here on Wordpress Development Stack. Setted a text domain in my style.css file: /* Theme Name: My ...
0
votes
1answer
50 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
80 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('...
2
votes
1answer
618 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
1answer
259 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
2answers
31 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
90 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
51 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
68 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
125 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
18 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
20 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
53 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
515 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
754 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
38 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
1k 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
958 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
75 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
31 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
823 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
43 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
28 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
608 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
185 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
40 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
50 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
1k 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
72 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
173 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
69 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
74 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
89 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
227 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
800 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
122 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
2 3 4 5
7