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
16 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 ...
0
votes
0answers
11 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?
0
votes
1answer
21 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 ...
0
votes
1answer
16 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?
0
votes
1answer
22 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 ...
0
votes
0answers
31 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 ...
0
votes
2answers
81 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 ...
0
votes
0answers
46 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 ...
0
votes
1answer
24 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( $...
0
votes
0answers
18 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 ...
0
votes
0answers
23 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. (...
0
votes
1answer
21 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. ...
0
votes
1answer
14 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&...
0
votes
0answers
13 views

multilingual theme but no multilingual posts

I have a Wordpress page with a custom theme translated into 3 languages using load_theme_textdomain. I can change the site language by going to settings > site language and the theme strings change ...
0
votes
0answers
14 views

How to create a 1 to N dynamic dictionary-like interface in a plugin page?

Background: I am currently expanding a plugin that is used only over the Network in Multisite mode. We have a network of sites in different languages, they are not the translated versions of the main ...
0
votes
0answers
17 views

Update .po & .mo localization files of a custom plugin

So I've developed some plugins using wp's localization functions (such as __(), _e(), etc.). I want to localize with PoEdit, a tool actually recommended by the wp docs. It works all easily to import ...
1
vote
0answers
9 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
39 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
225 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
12 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
404 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
435 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
123 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
35 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
7 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
14 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
19 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
10 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
42 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
42 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
19 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
99 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
19 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: ...
1
vote
1answer
880 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
18 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
30 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
356 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
27 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>'; ...
1
vote
2answers
146 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
1answer
67 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
1answer
30 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
1answer
206 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, ...
1
vote
1answer
318 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
31 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
1answer
668 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
36 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
143 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
19 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
1answer
387 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
31 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 ...

1
2 3 4 5
11