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
0 votes
1 answer
32 views

Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english

Looks like this has been introduced in WordPress 6.7 - I have the following code: $loaded = load_theme_textdomain(MY_TEXTDOMAIN,get_stylesheet_directory() . '/languages'); // internationalization $...
Blackbam's user avatar
  • 565
0 votes
2 answers
34 views

How to use native wordpress translation domain inside a custom plugin?

Inside a custom plugin with a custom post type page entirely rework, I would use wordpress native translation to translate the post statut and other wordpress default informations. I try to use the ...
imagIne's user avatar
  • 105
0 votes
0 answers
4 views

Plugin for translation from one account and posting in different account

this is my first post in this part of Stackexchange. Here is my situation and my question: I own two wordpress blogs in two different hostings and domains, one in each language (pt-BR and en-US). Both ...
Clóvis Fritzen's user avatar
0 votes
1 answer
28 views

Strings in class not being translated. (All other strings are.)

I have been handed an existing WP plugin for translation. I am using the WP __() function, which works fine in all cases, except for the following. (This is the relevant part of the code, of course, ...
Bart's user avatar
  • 1
0 votes
1 answer
80 views

Translations not making it into Block UI but work in the rest of the plugin

I'm currently flummoxed by a translation issue I've run into with a Block inside of my plugin. Both myself and the developer who did most of the work on the Block portions of the plugin have been ...
Jamie Poitra's user avatar
0 votes
0 answers
32 views

How to correct translation error in WP Astra Taxonomy block

In Astra Child theme, there's a nice Taxonomy block that displays all categories with the number of posts to them. Translated to Dutch, the plural form is wrong. It's "Berichts", should be &...
RolfBly's user avatar
  • 121
0 votes
0 answers
29 views

Translate string in another langage than Locale

I am developping a plugin for my company to register projects with some products. I am creating a purchase order for my supplier with this products. My local langage is french but my supplier is ...
mougeat's user avatar
0 votes
1 answer
53 views

WordPress Translation not working for my theme

Hi I've been trying to translate a string on my website using the translation function __( and _e and I'm not seeing it working on my site. for example i have a string on my site __( 'Show articles', '...
Dev Lady's user avatar
1 vote
1 answer
40 views

Translating the "Everything" filter menu in Quicksand jquery file

I have been using QuickSand Jquery to display my WordPress portfolio. Everything is working well. I just added the polylang plugin and would like to be able to translate the first item of the filter ...
made leod's user avatar
0 votes
0 answers
22 views

How to translate to a language different than the current one?

I have a problem. Site in English, with serveral languages. Say I'm in an Italian page, but I want certain phrases to be translated in French, for example. Currently using standard .po files. I need ...
Luca Reghellin's user avatar
0 votes
1 answer
44 views

Dashboard and Site Language only partially translated (in own theme)

I developed my own Block Theme. The default language of my Wordpress installation is English (US). If I change it to e.g. German (Switzerland), only a few words/sentences are translated in the ...
beat's user avatar
  • 43
0 votes
1 answer
334 views

Custom post type slug localization

I need to have 2 languages in a website (EN and LT). I have a custom post type 'services'. I need to have the links like this: English version of the service: '/en/services/some-service' Lithuanian (...
LinasK's user avatar
  • 1
0 votes
0 answers
46 views

Handling gettext / string translation when WP is installed in subfolder

My setup I have a custom PHP application that uses po/mo files in a locale directory to provide translations for the website strings. All works perfectly. I have Wordpress installed in a sub-directory ...
mayersdesign's user avatar
0 votes
0 answers
16 views

Approach to duplicate content like language plugins - without duplicating the page

I'm a little stuck while working on a site. I have already an existing site, and the client would like to have two copies of some of the pages - which content is presented is controlled by a query ...
romand's user avatar
  • 101
0 votes
0 answers
102 views

Translating Gutenberg Block - JSON Translation Files Not Loading

In following the steps outlined in this question I am unable to get it to work with the setup that I have. Essentially I have all my custom blocks within a structure like so: They are loaded in ...
Mike Badgley's user avatar
1 vote
0 answers
51 views

Save translation file of third party plugin in a custom plugin?

I have a custom plugin that I install on a handful of client sites. All the client sites uses a third party premium plugin, and I have translated that plugin to another language and saved the ...
Torben's user avatar
  • 11
0 votes
1 answer
150 views

Admin Notice is only localized when displaying the "Plugins" Backend Page

My plugin checks if a specific theme is activated. The check is hooked on init. If the theme is not activated, it displays a warning, hooked on admin_notices. This works fine. Now I added localization ...
Maxwwos's user avatar
0 votes
1 answer
92 views

plugin translation *.mo file not getting loaded for custom post

I'm encountering a weird behavior with the translation for a custom plugin I've made for a customer. The translation files are in the plugin languages folder and I load them with ...
piero's user avatar
  • 11
0 votes
1 answer
108 views

multisite same language different translation

I am ruing multisite, and I have two sites, and the two sites are sharing two plugins, pro and free; I have translated the two plugins on the first site. And I want to edit a few strings on the second ...
KDot's user avatar
  • 15
1 vote
1 answer
251 views

How to translate multiple blocks within one plugin

I'm struggling to get translations working on my custom blocks. I have a plugin with multiple blocks, following this file structure: /languages /build ..build files /src /block-one block.json ...
Infobahn's user avatar
0 votes
1 answer
110 views

How to find posts that are missing translation? (wpml)

I have a page with hundreds of posts that should all be available in two languages. In the admin area however I have differing post counts – so I guess some of the posts are not translated. Instead of ...
tillinberlin's user avatar
2 votes
0 answers
136 views

Can't load text domain in a mu-plugin

My plugin is in: /root/.../mu-plugins/my-plugin In /root/.../mu-plugins/my-plugin/languages/ I have the following files: my-domain.pot my-domain-fr_CA.po my-domain-fr_CA.mo The strings I want to ...
Gazillion's user avatar
  • 317
0 votes
1 answer
62 views

plugin translations not reflected in admin dashboard

I have a plugin which has all strings originally in English, now translations to Arabic have been done at 100% and are appearing on the project link. When I check the plugin's page in Arabic, it is ...
jaafar Nasrallah's user avatar
1 vote
1 answer
192 views

Transate plugin with js & wp_localize_script

I'm trying to translate a plugin with JS functionality. I was able to translate the classic php part with a .po file etc... In my plugin there are 2 words in js that I would like to translate and I ...
user avatar
0 votes
1 answer
49 views

How to automatically translate plugin using translate.wordpress.org

Is there a way to automatically download translations for a plugin from translate.wordpress.org. I'm testing with WPML String Translation. The plugin has about 20 untranslated strings and I need a ...
Snels Nick's user avatar
1 vote
1 answer
61 views

Should I include colon in my msgid in PO file? [closed]

Which of the below is recommended when creating msgid a PO file? msgid "Available Balance:" or msgid "Available Balance"
ratib90486's user avatar
0 votes
1 answer
867 views

Translate javascript with WordPress built-in localization API for static strings

I have been trying to implement the translation to a couple of strings in a .js file but nothing has worked. First try to do it like I do in php, in the .js file add this variable var __ = wp.i18n.__; ...
choseɳ's user avatar
  • 17
0 votes
0 answers
47 views

How to implement __() function 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, ...
anzorandom's user avatar
1 vote
1 answer
337 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 ...
Augusto A's user avatar
  • 111
0 votes
1 answer
84 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 ...
choseɳ's user avatar
  • 17
1 vote
0 answers
129 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 ...
pehu's user avatar
  • 11
0 votes
1 answer
196 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 ...
Caslaru Ion's user avatar
0 votes
0 answers
512 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 ...
pointydrip's user avatar
3 votes
1 answer
569 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 ...
Marc's user avatar
  • 697
0 votes
1 answer
169 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 ...
GWAdev's user avatar
  • 3
0 votes
2 answers
2k 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 ...
Buttered_Toast's user avatar
0 votes
0 answers
488 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 ...
Mountain's user avatar
  • 101
0 votes
0 answers
170 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 ...
Clément Ozor's user avatar
0 votes
1 answer
75 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 ...
zeko868's user avatar
0 votes
1 answer
35 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?
attack-to-overflow's user avatar
1 vote
1 answer
441 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 ...
Raging Vids's user avatar
0 votes
2 answers
746 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 ...
DevelJoe's user avatar
  • 497
0 votes
0 answers
117 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 ...
Maryando's user avatar
0 votes
1 answer
45 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( $...
David Dufour Morin's user avatar
0 votes
0 answers
41 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 ...
Usman Ali Qureshi's user avatar
0 votes
0 answers
33 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. (...
Andrew Lee's user avatar
0 votes
1 answer
50 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. ...
Chris's user avatar
  • 13
0 votes
1 answer
27 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&...
masoud nkh's user avatar
1 vote
0 answers
23 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
118 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
2 3 4 5
12