2022 Developer Survey is open! Take survey.

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
1 vote
1 answer
30 views

What does the underscore translate function do in my code without a textdoman

I am hooking into comment_form_default_fields doing some heavy string replacements. There are translated strings like __( 'Name' ) in there. I need the text. I have two or three different ways to ...
user avatar
0 votes
0 answers
37 views

Creating dynamic content and pages for 1000's of locations

How can I generate dynamic pages on a Wordpress website from information provided in a separate MySQL database? I have a database with Locations and I would like to have a page for each of these ...
user avatar
1 vote
1 answer
30 views

How to render a time-of-day string like '16:42' with a site's chosen time format?

I have a need to display a time-of-day value in a site's chosen time format. For example I have 16:42:18 and want to display it as 4:42 PM if the time_format option is g:i A, or 16:42:18 if the ...
user avatar
  • 427
0 votes
1 answer
33 views

Set two terms for a post when they differ only by an accent

I face the following situation: after manually adding (in the backend) the terms with names (not slugs) Mânie and Manie, that differs only in an accent/diacritic (they are totally different words with ...
user avatar
  • 1,081
0 votes
0 answers
7 views

How to find which .mo file is responsible for displaying a particular localized string?

Is it possible to find it out by examining the source code or by using the developer feature Inspect (like a style and its corresponding .css)? I know I can copy the entire content of the site and ...
user avatar
  • 1
3 votes
1 answer
117 views

WordPress: After Gutenberg plugin migration to block.json the localization/ translations with PolyGlot in JavaScript does not work anymore

I made a plugin with existing localization on WordPress.org for free. I migrated to block.json and made all changes by comparing it to the output of npx @wordpress/create-block todo-list. I read ...
user avatar
  • 579
0 votes
0 answers
19 views

Is there some ways to autofix the mo or po files instantly?

$ msgfmt -o en_CA.po en_CA.mo en_CA.mo:1:2: syntax error en_CA.mo:1: keyword "P" unknown en_CA.mo:2: end-of-line within string en_CA.mo:2:43: invalid control sequence en_CA.mo:3: end-of-line ...
user avatar
0 votes
0 answers
38 views

I want to dynamically create i18n ecosystem in WordPress

In WordPress, "__(), _e() etc." I want to create an ecosystem that finds locations and automatically generates ".pot" files. <Just like WPML.> Some research for this led me ...
user avatar
  • 23
0 votes
2 answers
276 views

Multilingual website without third-party plugin

I used to use third-party plugins (I tested both free and commercial ones) to do bi-lingual Wordpress websites, but now I want to be less dependent on third-party plugins. Question: Have you achieved ...
user avatar
  • 1
0 votes
1 answer
32 views

Translations for my plugin don't show up

I'm pulling my hair out with this one: I want to provide translations for my plugin, but they're not showing up. I followed the documentation and took the following steps: Set up local wordpress ...
user avatar
0 votes
1 answer
33 views

Use localized plugin name and description even when the plugin is disabled

I'm working on plugin development and I'd like to localize my plugin name and description, so that these two pieces of information are shown to other WordPress developers in their native languages (if ...
user avatar
2 votes
1 answer
429 views

How to set the localization for a Gutenberg block?

I'm trying to set localization for a Gutenberg block. After scaffolding a basic block with wp-cli command npx @wordpress/create-block, I need to set localization. I've create my pot file and ...
user avatar
0 votes
0 answers
7 views

Changing wp admin user's language does not update all of the plugin localizations in backend [duplicate]

I have a custom MU plugin mup for which I've coded some custom admin pages. For these and all of their related strings; I've successfully created the according .mo files and placed them all both in: ...
user avatar
  • 286
0 votes
0 answers
125 views

How to properly load text domain of custom mu plugin

I can't manage to load the text domain of my plugins and it's slowly but surely driving me nuts; especially cuz all the error feedback I get is: false. What I've tried so far (adding the following ...
user avatar
  • 286
0 votes
2 answers
204 views

Setting Email locale before retrieving gettext translations

I developed several plugins which I localized using the standard approach with __() functions and the .po or rather the .mo files. All of this works like a charm. What I now want to be able to do is ...
user avatar
  • 286
1 vote
0 answers
47 views

Translate emails into the language of the user

The following scenario: An admin activates a function or similar for a user (in the WordPress frontend). Now the user should be informed about this by email. Therefore an AJAX call is sent to the ...
user avatar
  • 11
0 votes
0 answers
15 views

wordpress does not load mo translation on cpanel

I have generated a po/mo translation file with Poedit for my theme: fa_IR.po fa_IR.mo files are located in /languages/ directory of theme root. loading text domain is done through the code: ...
user avatar
  • 103
0 votes
1 answer
27 views

Issue with translation - Gutenberg

Here is my code. I based it on CapitaineWP formation and template. I have the .pot, .po, .mo and .json files. $script_asset_path = PERSO_FOLDER."/build/index.asset.php"; if ( ! file_exists( $...
user avatar
1 vote
1 answer
94 views

Frontend language per user

There is a function of internationalization plugins on WP. If I make .pot files I can translate my plugin to any language. When I install a plugin to website I can choose any language and the plugin ...
user avatar
1 vote
1 answer
63 views

Multisite: How can I have the admin bar (toolbar) use the language of the user instead of the language of the sub-site being viewed?

By default in a network install, when viewing a sub-site, the sub-site language is used for the admin bar (toolbar). How can I have the admin bar (toolbar) always use the language of the user?
user avatar
  • 2,987
0 votes
1 answer
17 views

how to unlocalize theme/plugin?

I have theme with this code in one php file : 'logged_in_as' => '<p class="logged-in-as">'. sprintf( __( 'Logged in as <a href="%1$s">%2$s</a&...
user avatar
0 votes
1 answer
58 views

jQuery Datepicker displays wrong language until interection with the calendar

In a totally custom page, written as a PHP snippet using Woody Snippets plugin, I need to use a jQuery datepicker to select a date. I imported the necessary files correctly, and also called and set up ...
user avatar
0 votes
1 answer
12 views

Language string not detecting used within the function

I am using Mpdf lib to generate PDF for the plugin I am developing. The PDF has much more tabular data that require localization. For that, I have created a function for TH and TD as below. function ...
user avatar
  • 1,340
0 votes
1 answer
12 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 ...
user avatar
1 vote
0 answers
640 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 ...
user avatar
  • 111
0 votes
1 answer
20 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 ...
user avatar
0 votes
1 answer
25 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: ...
user avatar
  • 203
1 vote
1 answer
1k 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. ...
user avatar
  • 421
1 vote
1 answer
52 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,...
user avatar
  • 2,987
0 votes
1 answer
87 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 ...
user avatar
  • 286
0 votes
1 answer
279 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, ...
user avatar
1 vote
1 answer
180 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 ...
user avatar
  • 113
3 votes
3 answers
1k 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 ...
user avatar
  • 999
0 votes
1 answer
48 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 ...
user avatar
1 vote
1 answer
168 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-...
user avatar
  • 579
0 votes
1 answer
94 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 ...
user avatar
  • 147
0 votes
1 answer
56 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 ...
user avatar
0 votes
1 answer
1k 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(...
user avatar
1 vote
0 answers
57 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 ...
user avatar
  • 111
3 votes
1 answer
161 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 ...
user avatar
1 vote
0 answers
75 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 ...
user avatar
  • 258
0 votes
1 answer
61 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 ...
user avatar
  • 105
0 votes
1 answer
175 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 ...
user avatar
  • 449
0 votes
1 answer
274 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('...
user avatar
2 votes
1 answer
2k 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....
user avatar
  • 347
0 votes
1 answer
731 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', '...
user avatar
0 votes
2 answers
72 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?
user avatar
  • 325
0 votes
1 answer
227 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 ...
user avatar
  • 101
0 votes
1 answer
112 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 ...
user avatar
0 votes
1 answer
341 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 ...
user avatar

1
2 3 4 5
7