Skip to main content

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
1 vote
0 answers
21 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 ... ...
user1818326's user avatar
0 votes
0 answers
107 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 ...
Bahram's user avatar
  • 1
1 vote
1 answer
1k 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,...
Dalen's user avatar
  • 13
1 vote
1 answer
2k 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/...
Lety's user avatar
  • 131
1 vote
0 answers
1k 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 ...
itsoft3g's user avatar
  • 111
0 votes
2 answers
623 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, ...
Kztok's user avatar
  • 1
0 votes
1 answer
183 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 ...
Bondweb's user avatar
0 votes
1 answer
26 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 ...
annkswe's user avatar
  • 23
0 votes
1 answer
65 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 ...
Skymonkey's user avatar
0 votes
2 answers
106 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?
Daniel Simmons's user avatar
1 vote
1 answer
436 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( '...
Juraj's user avatar
  • 144
0 votes
1 answer
46 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: ...
SkyRar's user avatar
  • 202
4 votes
1 answer
3k 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. ...
kanlukasz's user avatar
  • 504
0 votes
1 answer
505 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 ...
Brad Dalton's user avatar
  • 6,926
1 vote
1 answer
52 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 ...
macl's user avatar
  • 138
0 votes
2 answers
4k 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( $...
Brad Dalton's user avatar
  • 6,926
1 vote
1 answer
57 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>'; ...
Botond Vajna's user avatar
1 vote
2 answers
503 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 ...
QQQ's user avatar
  • 11
0 votes
1 answer
117 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 ...
Kazimierz's user avatar
0 votes
1 answer
44 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 ...
ideosyncratic's user avatar
0 votes
1 answer
506 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, ...
Will Ashworth's user avatar
1 vote
1 answer
1k 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 ...
J.BizMai's user avatar
  • 870
0 votes
0 answers
155 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 ...
vowal's user avatar
  • 1
1 vote
1 answer
2k 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 ...
toneyt's user avatar
  • 41
0 votes
1 answer
69 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 ...
Omnia Magd's user avatar
1 vote
1 answer
492 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="" ...
MMK's user avatar
  • 538
0 votes
0 answers
102 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,...
Harrison's user avatar
0 votes
1 answer
876 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 ...
Mike's user avatar
  • 121
0 votes
1 answer
96 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 ...
Sahasrar's user avatar
0 votes
1 answer
174 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-...
Olga's user avatar
  • 1
0 votes
0 answers
205 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 ...
Jon Fergus's user avatar
1 vote
1 answer
57 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 ...
Aslan's user avatar
  • 55
2 votes
0 answers
190 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 ); $...
Reto Schneebeli's user avatar
2 votes
2 answers
467 views

Some translations do not work in my template class

I am struggling with the translations of my theme. I use the function get_permalink_date of my class. The relevant snippet is: $permalink_title = sprintf( /* translators: 1 = Post Title, 2 = ...
chrisbergr's user avatar
0 votes
1 answer
39 views

Which escaping function should be use on register_post_type label?

If I register a post type then which escaping should I use for escaping label? function book_setup_post_type() { $args = array( 'public' => true, 'label' => __( '...
Akhtarujjaman Shuvo's user avatar
0 votes
0 answers
264 views

Remove Home page slug in translated pages

I'm building a website in wordpress, and i've decided to use a custom page "home" for my website's home. I know that i could use the index.php file for the home page , but i needed to use some plugins....
Pedro Ferreira's user avatar
0 votes
1 answer
504 views

How to change WordPress core language using Loco Translate?

I just want to change the text "Add Media" to another English text. I search the text under my theme but it didn't appear. But under Loco Translate > WordPress, there're so many translation files. ...
Yibene's user avatar
  • 1
0 votes
1 answer
68 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 ...
Ingo Steinke's user avatar
0 votes
0 answers
441 views

Translatepress taxonomy and custom post type root FIX

I'm using Translatepress. Great plugin, one exception: they haven't developed translation for taxonomies and custom post type root slugs. Does anyone know how to achieve this? Some .htaccess magic ...
Alvaro's user avatar
  • 31
0 votes
2 answers
200 views

My theme is not translated

I have translated the po file and uploaded the mo and po files in the languages folder with the language code file name. But translation is not loading Here is the function file code: if( is_dir( ...
Viral Universe's user avatar
5 votes
5 answers
8k views

How to load translation in JavaScript?

I am struggling to load translation in JavaScript for my simple plugin. Translation works for PHP, but not in JS. What seems to be the problem, how can I debug this? I have loaded text domain in my ...
Marko's user avatar
  • 597
1 vote
0 answers
241 views

How to Translate a string of an array inside a class?

I want to translate my functions.php with custom code in it. There I have a Class "Glbl_Helper" with a public static array that contains strings like "translate_me". Now I want to translate the ...
Programming Farmer's user avatar
0 votes
1 answer
284 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 ...
Camilo's user avatar
  • 115
1 vote
1 answer
136 views

Create cron job for update translations automatically

I would like to set cron job in WordPress with WP Crontrol for update translations automatically. If I saw it right I have to create a PHP code (simple plugin) and then schedule it with mentioned ...
Feriman's user avatar
  • 289
0 votes
1 answer
53 views

Securing langugae folder

I have plugin and theme translations for my language and they work great. I had to change some translations in a few plugins and theme per customer needs. Today I updated WooCommerce and I lost my ...
Skafec's user avatar
  • 1
1 vote
1 answer
183 views

Can't have a Persian website with a completely English admin panel!

I'm new to WordPress. there is a problem which really freaks me out. the WordPress(v5) which my host installed for me was all in Persian; I changed the user language to English, the main interface ...
Sepehr23's user avatar
1 vote
2 answers
586 views

How to translate functions like get_the_date()?

My wordpress website has two languages. The theme translates properly, but whenever I use get_the_date it is in the default english language. How do I force the use of another language? The locale ...
Кристиян Кацаров's user avatar
0 votes
1 answer
211 views

How can I show the author's latest post with title?

The following is my code: (klcom is my theme name) I just show the author by: name and description, I want to show the author's last 3 post with tile after each author, How can I code? Thanks <...
user176974's user avatar
0 votes
0 answers
49 views

How to call wordpress API to translate a post request

Assuming am trying to send a post request for my application from wordpress. I know how to do that via wordpress function. Here is my question: lets assume I want translate a certain words in a ...
Nancy Mooree's user avatar
0 votes
2 answers
2k views

Changing text for "Continue reading..." translation

I am not satisfied with the read more text in Twenty Fifteen (I am using the French translation). In English it says "Continue reading", and in French it is very similar, but it didn't work well with ...
WQT's user avatar
  • 13

1
2
3 4 5
12