Questions tagged [translation]

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 localization (l10n).

Filter by
Sorted by
Tagged with
0
votes
0answers
17 views

How to add language switcher in menu in custom theme where languages are added with .po file? [closed]

I have developed a custom theme for a client. And one of the requirements is that the site will be in multiple languages with custom post types[still in development]. I have explored how to translate ...
1
vote
0answers
7 views

Working with .po and .mo files translation

I translated a plugin with poedit and translation is fine, I checked it changing default language inside general > language. Then I installed Qtranslate-x, it works fine with titles, contents ... ...
0
votes
0answers
21 views

Structure of multilingual and multiregional directory listing website for translation

What is the best translation structure for a multilingual and multiregional directory website? Let's say our listing owners as members of our work team are from around 20 different countries with ...
0
votes
1answer
41 views

How do I create a function that modifies a message in the wp-login.php file?

When a user uses the password reset functionality in WordPress, they are asked to enter their email and click confirm. After doing so, they get the message: Check your email for the confirmation link,...
0
votes
0answers
7 views

Translate Pages Of A WordPress Site Into Subfolders

I have a client who wants some pages on a website translated into Cantonese (they are hiring a human translator to do this). Looking at this subject is seems that to translate web pages you set up a ...
1
vote
1answer
69 views

Can't generate pot file using wp cli

I'm developing a child theme and I want to get .pot file using wp-cli. I follow the wp-cli handbook and run: cd /media/sf_TOOLS/ubuntu-20.04/bin curl -O https://raw.githubusercontent.com/wp-cli/builds/...
1
vote
0answers
157 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
96 views

How can all E-mails be sent with BCC copy to Admin?

I'm translating WordPress page into seven different languages. Have around 70 plugins active and working, no worries. Subscriptions, shop, pre-orders you name it. Getting there with translations, ...
0
votes
1answer
18 views

How can I tranlslate post date in italian?

I'm using this filter to display post date in my single and archive pages, because working on a windows azure php app I can't show post date before 1901. This filter is working but It displays post ...
0
votes
0answers
6 views

Translate a WordPress plugin upon the change of the user's profile language

I successfully translated a plugin upon the change of the site's language. But at a loss how to do so upon the change of the user's profile language. On top of that, I can do so with other plugins but ...
0
votes
1answer
12 views

Translation is not being output in one instance

I am creating translation for a custom theme and specifically custom template file of the theme and user Poedit to create the pot template. After translating the file one line in the template won't ...
0
votes
0answers
15 views

Wordpress multisite How to apply PO translations to common core files shared by all language sites

I am using Multisite to create a Spanish version of the site as a subdomain. The wordpress default po files include the translations I need, and they are being successfully applied to the strings in ...
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
2answers
38 views

Is there any way to use @wordpress/i18n for <5.0?

I'm looking to make use of translation strings inside my JS files and unfortunately, I've read that @wordpress/i18n doesn't work <5.0. Are there any tools/libraries that help me with this?
0
votes
0answers
19 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/...
1
vote
1answer
14 views

How to display get_post_type() translated?

In my content-search.php template file I did something like this: <tr id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <td><?php the_post_thumbnail( '...
0
votes
1answer
32 views

pll__() polylang function undefined when replacing __() in plugin

We use Splitit to process certain payments and are trying to implement translations with polylang. Simply, we are replacing () with pll() and registering the strings in functions.php The issue is that ...
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
208 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
1answer
16 views

Get Text Domain For Transalation

Is there a function which can be used to get the themes text-domain? For example, if i want to provide this code to users without them needing to swap out the text-domain, can this be done, rather ...
1
vote
1answer
27 views

Plugin translations not installed but… strings are translated!

I've had for a long time a site with the famous Recent Tweets Widget. The plugin came as part of a theme, and back in the day, it included translation .po and .mo files for French language. I didn't ...
0
votes
2answers
54 views

Using _e() or __() to translate text with div

Is this the correct way to translate a sting of text? _e( '<h2 class="title">' . $var . '</h2>', 'text-domain' ); or, is this? echo '<h2 class="title">'; _e( $...
1
vote
1answer
21 views

WPML custom string translation get outside of container

I am trying to add a custom string to translate in wpml, but when I use the _e(...) the content jumps outside of container if I use like this: echo '<h1>' . $month . ' ' . $day . '</h1>'; ...
0
votes
0answers
10 views

Translated posts are all converted into random strings

I am using polylang and lingotek plugin for translation and I am trying to build a multilanguage website. I have using Nepali and English whereas English is my default language. All of a sudden all ...
1
vote
2answers
63 views

How do I translate month names in post metadata?

I'm trying to translate the month names as underlined in this image, without changing the entire WP backend as well, as I require the backend to remain English. I managed to translate the default ...
0
votes
0answers
25 views

Po/Pot file can not read from function.php

I have a pot file and I translated it as a po file, but it can't read from function.php and it's not working. What shpuld be changes in function file? This is panel-functions.php: <?php //...
0
votes
0answers
19 views

translate footer

good I want to translate my footer, when the user changes the language of my wordpress the footer is placed either in English or Spanish the text is translated, without using plugins, then I would ...
0
votes
1answer
55 views

WC_Structured_Data Class Causing Needless Translation

I am using the Weglot plugin to translate our Woocommerce site. Weglot allows you to exclude areas that you don’t want translated, to save from your quota of words. Weglot says: Excluded Blocks By ...
0
votes
0answers
55 views

Wordpress + Polylang: translations too time consuming, how to optimize?

I am using Wordpress, Porto Wordpress Theme and Polylang for translation (4 languages). I need to translate all website pages into all 4 languages. The website has around 50 pages. I plan to create ...
0
votes
1answer
26 views

How to translate wordpress blog to other languages?

I have a blog in wordpress security niche. It is currently in english and is quite popular with wordpress folks but i want to target other languages/countries as well. What would be the ideal way to ...
0
votes
0answers
43 views

How to get translated role names from different plugins?

For some reason in edit-user.php I have to do a checkbox list of user roles. I got it but I have a problem of translation. My code <?php foreach ( $roles as $role_id => $role_data ) : ?> ...
0
votes
1answer
144 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, ...
0
votes
1answer
158 views

How to save post with different languages and linked them with WPML?

I received a php object ($binding_main_cpt) built from an external API like this : array ( 'post' => array ( 'en' => array ( 'post_title' => 'Villa with magnificent sea ...
0
votes
0answers
29 views

__() function inside html tags

sprintf(<span style="display:block;margin:4px 0 0;line-height:1.25em;font-size:95%%"> Image credit: %$s</span> esc_html( $credit )); I would like to add __() function to translate Image ...
0
votes
0answers
140 views

load_plugin_textdomain was called with an argument that is deprecated since version 2.7.0 with no alternative available

I tried to update Avada theme using ftp. I deleted Avada folder and copied that again from zip file I downloaded. Since then, I am facing these errors: Deprecated: load_plugin_textdomain was ...
0
votes
1answer
334 views

Loco Translate: Custom Post and Custom Taxonomy Labels not translated in wp-admin menu

I am currently translating all of my plugins with loco translate. This is working fine on frontend and in all metaboxes in the backend, but not in the wp-admin menu: The red circled word should be in ...
0
votes
1answer
21 views

translate wordpress website from english to arabic

I install weglot plugin and add arabic as destiantion language but when change website from english to arabic i get this error Not Found The requested URL /ar/ was not found on this server how can ...
0
votes
1answer
84 views

Translate string inside twig template

I am trying to translate a string inside a placeholder in a twig (timber) template. But I cannot detect the string in WPML string translation. <input type="text" id="s" name="s" value="" ...
0
votes
0answers
16 views

How to conditionally concatenate and translate two very long strings?

I am conditionally concatenating a very long string onto another very long string. Then I am returning it as the argument to another function. I think I should translate the strings individually first,...
0
votes
0answers
70 views

Advantage of saving term translations with polylang?

Ok, so I'm trying to automate the generation of posts and custom taxonomies in different languages, and it's all working. What I did (summary): create posts with wp_insert_post() set language of ...
0
votes
1answer
152 views

WordPress filter load_textdomain_mofile not working inside a child theme's functions.php but works form inside a plugin

Function in a plugin is behaving differently than function in the functions.php inside a child theme. I have a custom simple plain plugin with nothing but the following code in it and it works ...
0
votes
1answer
24 views

Language does not switch while cache is enabled

At my website I have a button when pressed PHP script through ajax write session variable to change language and reload page. But when I enable caching every time is loading default language. When ...
0
votes
0answers
9 views

Wordpress: How to change the text of automatic E-Mails e.g. after changing your password? (German localization) #2

According to this, which was posted some years ago, I understand it is (was) possible to change the password changed mail text using Poedit. I need a clarification though: The .po file containing the ...
0
votes
1answer
54 views

Wordpress theme doesn't read my translations from pt_BR.po file

I used PoEdit to create my .pot file. Added some translations, then created a .po file alongside with automatically created .mo file. My .po file looks like this: msgid "" msgstr "" "Project-Id-...
0
votes
0answers
36 views

How to translate strings in comment form?

How to translate strings in comment form? I need to change string "Název" to "Jméno" and "Email" to "Emailová adresa". I didn't found this strings in .po files.
0
votes
0answers
15 views

Unable to translate with pot file Azuma Child theme

I have looked for a lot of information and I need to ask here because I'm not able to translate my child theme in Wordpress. I installed Azuma Theme (Free version) and, after it, I installed their ...
0
votes
0answers
43 views

Theme translates the_author_posts_link. How can I remove their translation?

My theme (Avada) translates the function the_author_posts_link to add “By ” before the author’s name (see their code below). I don't want “By ” before the author’s name. How can I override this ...
0
votes
0answers
58 views

Woocommerce: “is a required field” not translated

I have this problem from a long time and more than a theme. I now have this site build with storefront and the string “is a required field” given in error messages in checkout is not trnslated. ...
1
vote
1answer
31 views

Translation Issue with Wordpress Theme Check in comment_form function

I ended my wordpress theme, which called the_mdttheme. I tried to check it and get two errors with translation in comment_form(). Can't understand what did wrong, can someone help me? Here is two ...
1
vote
0answers
25 views

Wordpress if (is_page) translation on certain page

Hy there i have the following code for custom translations there are missing. function translate_text( $translated ) { $translated = str_ireplace( 'All Ratings', 'Alle Bewertug', $translated ); $...

1
2 3 4 5
11