Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Translation is the term used to describe the effort to make WordPress (with themes and plugins) available in languages other than English for people from different locales, who have different dialects and local preferences. The process involves two main topics: internationalization (i18n) and ...

-2
votes
0answers
14 views

Translate homepage of a WordPress site

How can I translate titles in the homepage of a WordPress site? Like "TENNIS" and "CYCLING TOUR" in the following screenshot:
0
votes
0answers
12 views

Page-section link doesn't work with translation

I've set up a bilingual site (with the TranslatePress plugin, which adds ?lang=en etc. to the end of a URL to select language), and links to page sections don't work properly. Normally, I create ...
-1
votes
1answer
15 views

Auto translate plugin text-domain [on hold]

I'm searching for a plugin that automatically translate plugins. I don't want plugins like polylang or gtranslate, I don't want to have more than one language in my website(The website has only one ...
-1
votes
1answer
27 views

ACF + WPML: How to translate date fields?

I'm trying to translate the month name outputted by an ACF date field. How do I get the Spanish versions of those month names? Here's an example of my code: $start_date = get_field('start_date'); $...
0
votes
0answers
17 views

How to deal with differently translated prepositions?

I'm maintaining a Wordpress site in both English and Portuguese. I'm using .po and .mo files. The site is related to elections. In English, you can always say "Candidates in {{state}}". In ...
1
vote
1answer
44 views

Fetch ID's associated with a custom post type when translated with WPML?

I've created a custom post type (roomtype). Now these roomtypes has post id 272 (single room in swedish) and 350 (double room in swedish) I've made it translatable (with WPML) and created in english. ...
0
votes
2answers
23 views

Wordpress Baskerville 2 translation

I don't understand how translation works in Wordpress. I made my first wordress using Baskerville 2 theme and I would like it to be translated in French. How does it work ?
2
votes
2answers
39 views

why is translation not working on theme?

Background I am using the theme Rookie from Sportpress. I created a child theme. Translation files are existing, especially german in my case. Wordpress is set to german language. The Problem ...
0
votes
1answer
38 views

How to Convert Date to Thai

The Thai text I want to end up with is: อาทิตย์ 03 มกราคม 2016 to อาทิตย์ ๐๓ มกราคม ๒๐๑๖ I don't think it should matter what language but in this case it is Thai. My function is: $strdate = ...
0
votes
1answer
31 views

Conditionally change Wordpress core language

I need to change the wordpress language conditionally. So I use the code: //Change Site Locale function wpsx89972_redefine_locale($locale) { if .....my condition exists... { $locale = 'en_US'; } ...
1
vote
1answer
28 views

Is is safe to edit language files from wp-content/languages/plugins/woocommerce-ro_RO?

Is is safe to edit language files from wp-content/languages/plugins/woocommerce-ro_RO.mo(.po) ? I'm asking this because I don't want them to be overriden on plugin update. Sorry if dumb question.
0
votes
1answer
24 views

Translate pages and URLs without duplicating

I would really appreciate some suggestions about what plugin to use in WP with DIVI editor, to translate my web site and following these specs: do not duplicate pages (that's really important) ...
1
vote
0answers
68 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
0answers
26 views

Testimonials not showing in wordpress site for arabic translation

I've developed a bilingual website on wordpress. In my wordpress site I'm using Testimonials for user reviews on my site. The testimonials are working fine for english translation but when i switch ...
1
vote
3answers
106 views

Is this a correct usage of esc_html_e?

<h1 class="page-title"><?php esc_html_e( 'Oops! Something went wrong.', '_amnth' ); ?></h1> I think this should simply use the __() function, since it's a static string and it ...
0
votes
0answers
15 views

How to reload WPML string translations for a reloaded theme textdomain?

I have an action that changes the theme locale from the plugin in the following way (plugin/wcet/wcet.php): $locale = get_custom_locale(); add_filter( 'theme_locale', function() use ( $locale ) { ...
0
votes
0answers
17 views

Translate WP/WC request data strings

Has anyone come a cross on how to translate the email and message from request links for export data (gdpr) WordPress and Woocommerce ? I added the text from the thanks for confirming... to the .po/....
0
votes
1answer
65 views

WordPress i18n in Array throws Error

i am wirting my very first plugin. For publishing it to the repository i want to make it translatable. On my options page i some arrays, which store the default settings. Somehow i get an error when ...
0
votes
1answer
32 views

wordpress plugin translation not working

I have no idea what is wrong here. First I would like to share probably all required info. Plugin tree: $ tree . ├── classes │   ├── database │   │   ├── plugin-auth.php │   │   ├── plugin-user.php │...
1
vote
1answer
35 views

loco translate plugin edits file in plugin folder

I'm creating a plugin that must be translatable. Under plugins/my-plugin/languages I've my .po, .pot and .mo files. When I translate something in loco plugin I can see translation applied as ...
1
vote
1answer
43 views

Internationalization: Not loading plugin translated text

I am trying to internationalize the plugin I am creating but it doesn't seem to display the translated texts that are translated in the .po file. Firstly, I have referred to the following sources: ...
3
votes
2answers
78 views

Disabling Translation Update

There are two ways that WordPress updates translation files inside Languages folder: 1. Automatic updates whenever it gets triggered. 2. Manually when user requests it on "Updates" page. Is there a ...
0
votes
0answers
28 views

How to disable translations update notifications for a plugin?

I need the plugin to keep notifying about the updates, except for its translations. Is it possible to disable translations update notification for a specific plugin?
1
vote
0answers
29 views

Ajax - gettext without a plugin

How would you go about setting the correct language returned in AJAX calls, when you are not using any plugin? All other strings in page work fine just by defining WPLANG to a proper locale. ...
0
votes
0answers
27 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
20 views

Wrong language used while sending email from a filter callback

I'm sending email to admin and user when they filled a certain form. I'm using two different hooks then, one is this one: transition_post_status And the second is pending_to_publish Both seem to ...
1
vote
1answer
105 views

How can you locate the .po file used for translation of a page?

I'm trying to translate a plugin, Dokan Pro, but I can't seem to find the correct .po file that my Wordpress site is using to translate. Part of it is already translated in Italian, but other parts ...
0
votes
2answers
39 views

menu customization

I am using a premium theme on my page. The theme only accepts one menu in the whole site. The site is a single page site. And the way the theme works is that we have to set up a Home Page and then ...
0
votes
0answers
19 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-...
0
votes
0answers
21 views

Loading WooCommerce translation from custom location

I'm trying to load a WooCommerce translation from a custom directory called “languages” inside my child theme, so I added this function to my functions.php file but it isn't working: // Loads ...
0
votes
1answer
43 views

Trouble translating a Child Theme

I'm having a hard time trying to use a custom translation for my child theme based on Storefront (WooCommerce) For some reason, the translation doesn't take effect. Here is what I did: Created a ...
1
vote
1answer
96 views

Translate MCE button text/tooltip in custom plugin

I am using a custom MCE button in my wordpress custom plugin below is my code function enqueue_plugin_scripts($plugin_array) { //enqueue TinyMCE plugin script with its ID. $plugin_array["...
1
vote
1answer
96 views

Overriding single plugin translation

Is it possible to override single plugin translation in function.php file and how that can be done?
0
votes
2answers
61 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
28 views

Do translation functions like __e() have to take strings in English in themes?

I'm developing a theme and curious if strings could be written in a language different from English and still be properly translatable? What I mean is when using translation functions in a custom ...
1
vote
2answers
102 views

How to translate WordPress Emails?

I'm running a multilingual site, and I want the emails sent to the user to be in their language. The scheme I already have is the following: The website determines the user's country through their IP....
0
votes
0answers
9 views

How to post one comment for all the translated posts

I have a commenting system with wordpress multilingual website on custom post type "recipe". Where anyone can comment my issue is i have english, spanish and german as my website language.. if someone ...
1
vote
0answers
586 views

How to edit T&C checker text in Woocommerce checkout page? gettext?

I'm trying to edit wording in terms & conditions checkbox on checkout page (order review section), but without luck. It was easy to edit other fields like billing and shipping fields. But I'm not ...
0
votes
1answer
29 views

Add language localisation to javascript alert?

I have a series of language files for a plugin. It all works as expected. If I add a javascript alert, how do I translate the text of the alert? PHP would be __('example text', 'context'); What is ...
0
votes
2answers
75 views

.mo translation strings not loading in PHP scripts that handle AJAX calls

using the standard __('some-string', 'myplugin') for translations, strings are being correctly loaded for a Japanese (ja) locale in every function and script other than my AJAX functions. my-plugin....
0
votes
0answers
15 views

Plugin: Translated plugin is “not translated”

I created a "site specific plugin" what adds a custom post type to my wordpress instance. I made a .po file for it with PoEdit and even Loco Translate shows that it's 100% translated, but it's not ...
0
votes
0answers
146 views

Wordpress Subdomain URL Redirection using qTranslate-X Plugin

I just want to know whether qtranslate-x supports URL redirection on subdomain? For example, my homepage is at www.domain.com. By default, using qTranslate-x activated, someone whose browser's ...
0
votes
1answer
41 views

How to add translation for a string

My wordpress website is using non-english language (e.g chinese), and its backend already turned to chinese but in wp-content\plugins\divi-builder\includes\no-results.php (i'm using divi builder, in ...
1
vote
1answer
111 views

use __($str) to translate strings (symfony/twig)

I usually use frameworks like Yii(2), Zend or Laravel to build pages but a customer forced us to use Wordpress this time. I integrated Symfony/Twig as my template engine but now I have trouble with ...
0
votes
0answers
26 views

How to translate an error message: ERROR: Password field is empty

Good afternoon! I'm having a problem translating this phrase, could anyone help me translate it? It occurs when I try to log into the system without filling anything in the input
0
votes
1answer
152 views

How to translate wordpress error message

I have a problem and I am not finding the variable to solve, I have a site in WP and when I try to login and neither the password nor the email exists, I get the error message: ERROR: The username or ...
1
vote
1answer
14 views

How can I check if a var is equal a translated label?

In my plugin, I can publish a custom post. When I click on the "Publish" button, I have this data $_POST Array ( [foo_title] => test [foo_price] => ... [save] => Publier ) ...
1
vote
0answers
31 views

Build a translation correcter plugin

I'm planning on creating a plugin that fixes the translation issues of a specific theme. This theme is already translated into multiple languages but the translation is horrible. I don't know how to ...
0
votes
1answer
121 views

esc_html__() and __() not working within arrays

I'm creating a widget but the title and description is not translatable. I'm often face this problem with arrays, I use esc_html__() inside the array which is supposed to return the translated ...