2022 Developer Survey is open! Take survey.

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
0 answers
12 views

How to implement Polylang functions in my theme's php file?

I am translating a site with Polylang that was created by someone else using a custom theme. Some strings couldn't be found by Polylang, so I need to manually register them for Polylang to see. Now, ...
user avatar
0 votes
0 answers
23 views

How to work with multilingual sites using the full site editor and block themes?

I'm developing a block theme and I need the user to edit the site content with the full site editor in two different languages. In this situation, what would be the approach to allow the same page to ...
user avatar
0 votes
1 answer
29 views

Translation for a text that is not printed on the screen

How can I enable the translation for a text that is not printed on the screen? I was recently implementing the translation to my plugin and everything worked as expected. But doing the tests I ...
user avatar
  • 15
1 vote
0 answers
17 views

Translation for frontend

In my plugin I have many strings to translate for the backend and only a few for the frontend. For the visitors of the website it is nicer to read the words in the language of the site. Is there a ...
user avatar
  • 11
0 votes
1 answer
15 views

Translate website without duplicate custom post

I have a website where anyone can post jobs from frontend. The jobs pages are rendered by custom archive and single pages in my custom theme. I want the website to be multi language with switcher. The ...
user avatar
0 votes
0 answers
47 views

String translation for esc_html__() when registering string [closed]

I am trying to translate the string 'Home' in wordpress that is registered as an esc_html__(). This is the code registering the themes functions.php: if(!function_exists('gem_breadcrumbs')) { function ...
user avatar
3 votes
1 answer
118 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
1 answer
31 views

Automatic translation with different domains per languages?

I would like to know if there is a plugin to make automatic translations with one different domain by language for the same project. For example : car.co.uk for the English voiture.fr for the French ...
user avatar
  • 3
0 votes
1 answer
217 views

Using wp-cli to create a .pot file that interprets .twig files as well

Using the wp i18n make-pot I can create a .pot file that can interpret .php files. This is the command I use wp i18n make-pot . languages/my-plugin.pot This is good but because I use timber with my ...
user avatar
0 votes
0 answers
56 views

Translations only load from `wp-content/languages/plugins` but not from the plugin's languages folder

I translated my plugin and put all the files (my-plugin-de_DE_formal.po, my-plugin-de_DE_formal.mo, my-plugin.pot) in the wp-content/plugins/my-plugin/languages folder. My plugins header says: … Text ...
user avatar
  • 101
0 votes
0 answers
30 views

Date translation doesn't work

I would like to translate into French the month of the date I get with the function: get_the_date() I have done several searches and found several solutions but none of them worked so far. I have ...
user avatar
0 votes
0 answers
10 views

Translation working on staging site, not on live one

I’m in a bit of a pickle. I tried migrating a site to a live URL, and all of my translations disappeared. I made a small video to explain the issue: I used ALL-IN-ONE Migration to transfer the site. ...
user avatar
0 votes
0 answers
18 views

Translations not appended even strings are edited

Well after 5 days of trying to find solution, I think I need WordPress magician to help me solve this. I am translating my WordPress site. So far I have translated over 80% of the content mainly ...
user avatar
0 votes
0 answers
18 views

Translations not working on Safari

I have bilingual Wordpress page and I'm adding translations in my .po file. They work fine on every browser except Safari. Is there any way I can fix this or any idea why it's not working?
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
0 votes
1 answer
18 views

Include external po file for 3th party plugin to theme

I used 3th party plugin in my theme but some of them don't have my target language support.I want to add new language support to these plugins from my theme plugin.How can I do it?
user avatar
0 votes
1 answer
60 views

Making WP theme / plugin multii-lingual without plugins

I am new to theme and plugin development and am stuck at the translation part. I read one place that if you are using __(), and e() throughout, you do not need a plugin like WPML. Is it correct? Is ...
user avatar
0 votes
0 answers
36 views

Gettext: Specify base language for translatable strings?

I have plenty of customizations on a page which was only meant to be used for german audience - hence I hardcoded the some German sentences directly into the functions.php whereever I had language ...
user avatar
  • 152
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
0 votes
0 answers
54 views

How can I change a translation for a string in a plugin?

I'm only starting with WordPress development so please be gentle :) I'm using the Amelia Booking plugin and am trying to change the string "On-site (Bank Transfers Only)" which is defined in ...
user avatar
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
0 votes
0 answers
23 views

Is there a way to load translations from .PO and .MO files for Customizer strings?

I would like to ask if there is a way, a filter or a hook that lets us display the translated strings of the Customizer options. For example, most WordPress themes provide translation files in the ...
user avatar
0 votes
0 answers
27 views

HTML Elements in my WP Plugin being generated in JS. Security and Translated Text Question about this method being used

So unfortunately when developing my WP plugin I created some methods that will help me generate HTML elements and their attributes with document.createElement. One example function is provided below. (...
user avatar
0 votes
1 answer
30 views

Wordpress Include 'print_f' in WP_Customize_Control array [closed]

I have the following problem: I want to add print_f in an array in wordpress. printf( __('Option to share on %s', 'themename'), 'name') However, the following code does not work properly for me. ...
user avatar
  • 3
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
1 vote
0 answers
11 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 ... ...
user avatar
0 votes
0 answers
62 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 ...
user avatar
  • 1
0 votes
1 answer
462 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,...
user avatar
  • 3
1 vote
1 answer
703 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/...
user avatar
  • 131
1 vote
0 answers
643 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
195 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, ...
user avatar
  • 1
0 votes
1 answer
50 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 ...
user avatar
0 votes
1 answer
18 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 ...
user avatar
  • 23
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
2 answers
62 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?
user avatar
1 vote
1 answer
61 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( '...
user avatar
  • 144
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
2k 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
  • 431
0 votes
1 answer
26 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 ...
user avatar
  • 447
1 vote
1 answer
34 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 ...
user avatar
  • 138
0 votes
2 answers
747 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( $...
user avatar
  • 447
1 vote
1 answer
37 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>'; ...
user avatar
1 vote
2 answers
216 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 ...
user avatar
  • 11
0 votes
1 answer
84 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 ...
user avatar
0 votes
1 answer
36 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 ...
user avatar
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
468 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 ...
user avatar
  • 770
0 votes
0 answers
47 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 ...
user avatar
  • 1
1 vote
1 answer
907 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 ...
user avatar
  • 41
0 votes
1 answer
47 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 ...
user avatar

1
2 3 4 5
12