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

Do I lose translations when I change my Text domain for my plugin on wp.org?

In readme * Text Domain: advanced-responsive-video-embedder Do I lose translations when I change my language domain for my plugin on wp.org? I am annoyed by advanced-responsive-video-embedder ...
1
vote
0answers
165 views

Generate JSON files for language translation from po file without wp-cli i18n make-json

My plugin uses wp_set_script_translations() to load translations for JS as mentioned here https://make.wordpress.org/core/2018/11/09/new-javascript-i18n-support-in-wordpress/. I understand that when ...
0
votes
1answer
6 views

Plugin language always shows WP site language, not profile language

I wrote a plugin that I translated from English to German. The German translation only shows up, when I change the site's language to german. Once the site language is set to German, it will always ...
0
votes
0answers
20 views

Understrap theme translation directory issue

I have my language translation fa_IR.mo and fa_IR.po and understrap.pot files in theme languages directory. but theme does'nt use them.instead it uses translation in directory: wp-content/languages/...
0
votes
1answer
14 views

Is hint for translator compulsory while internationalizing a string containing variables?

I am following this official guide to internationalise my plugin. But I am confused if the hints are must required incase of variables inside string? printf( /* translators: 1: Name of a city 2: ...
0
votes
1answer
218 views

`wp_set_script_translations` with `wp.i18n` does not return translated strings in simple plugin

Short description: I try to translate strings in JS file. To test it I decided to create a simple test plugin. I have PHP and JS strings there. Translated PHP strings work fine, JS strings don't work. ...
0
votes
0answers
12 views

MO functions causing significant time on load - Wordpress - WPML

Is there a way to enhance localization as its notably having a huge hit on load speed, is this speed normal on a testing server(shown below on webgrind)? if there are any suggestions it would be ...
1
vote
1answer
12 views

Multisite: How to get a list of installed languages

In a network install there is a language setting which will let the super admin user install a language from a list of available languages. How can I get a list of the installed languages? For example,...
0
votes
0answers
7 views

Posts written in different languages and GTranslate

any ideas on how to deal with different authors languages and a multilingual site? Is this possible with GTransalte? Or better to choose plugin which specifies post language on post creation, but what ...
0
votes
1answer
29 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
147 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
42 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
353 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
28 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
21 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
52 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
46 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
50 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
642 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
33 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
62 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 ...
1
vote
0answers
51 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
37 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
71 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
166 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
1k 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
444 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
43 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
135 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
69 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
139 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
154 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
22 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
26 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
57 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
791 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
980 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
40 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
3k 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
1k 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
32 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
1k 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
44 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
651 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
205 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
41 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
51 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
2k 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! ...

1
2 3 4 5
7