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
1answer
375 views

Qtranslate-X get raw post title value

How can I get a raw value of post title using Qtranslate-X plugin? I have 2 active languages - [:et] and [:ru] $posts = get_posts($args); if($posts){ foreach($posts as $post){ $title1 = ...
0
votes
0answers
21 views

how to link local pages with flags in submenu

we have 4 flags on our website in the submenu. two, german and english are leading to the internal translation (wpml) the other two (chinese and russian) are leding to external links (local copies of ...
2
votes
1answer
46 views

Translate strings not recognised in plugin

I am trying to translate my plugin strings, but for some reason my plugin does not find the strings via the _e() and __() functions. My plugin directory is called test-plugin. My plugin /test-plugin/...
1
vote
2answers
1k views

Unknown language json files

Situation Since some version ago (currently running 5.0.3) some plugin updates generate translation files like wp-content/languages/de_DE-1aeac217128913231c1a10ae951869.json We use two systems, one ...
-1
votes
1answer
85 views

Translations in source code

I have finished and deployed a WordPress site. Looking the source code inside browser tools, there are scripts embedded in the HTML code with all strings (original-translated) including all Gutenberg ...
3
votes
1answer
248 views

load_plugin_textdomain in `plugins_loaded` or `init`?

Which is the best/recommended way to hook load_plugin_textdomain within - plugins_loaded or init? and what are drawbacks using either.
2
votes
2answers
886 views

How to extract translatable (double underscores and _e) strings?

I made a custom theme and wonder how could I extract all translatable strings to a .po file so I can translate it. Do I need WPML plugin? Ex: I have a string "soccer" which is written as _e('soccer','...
1
vote
1answer
379 views

Translations not returning translated strings

I have the following function to display my comment form in my child theme function pietergoosen_comment_form_fields( $args = array(), $post_id = null ) { if ( null === $post_id ) $...
6
votes
1answer
2k views

How do translated, escaped strings (esc_attr) in Themes work?

I was looking at the TwentyEleven code and found this: esc_attr__( 'Permalink to %s', 'twentyeleven' ) This is some code that came out of the title tag for a post; the full code within the title tag ...
0
votes
1answer
31 views

Why translations?

I wonder why my WordPress installation has frequent updates for all sorts of translations, as my webpage is in a single language only (German). Is there some way to uninstall languages/translations ...
34
votes
10answers
47k views

How to create .pot files with POedit?

I've spent hours today on what seemed like something really simple, which is to create a .pot file for a Wordpress theme that I'm creating. I've read the Smashing Magazine article, the Tutsplus ...
2
votes
0answers
195 views

Gutenberg not all editor text translated

I just upgraded to wordpress 5.0 and not all text in Gutenberg is translated to my website's language German and stays in English. I already tried disabling all my plugins and switched to default ...
0
votes
1answer
40 views

How to use my .mo file in the Divi child theme instead of file in a parent /builder directory?

I use Divi from elegantthemes.com there is a Lang folder in my parent wordpress theme; I added my own .mo file in the child-theme using load_theme_textdomain. but there is another file located in /...
0
votes
1answer
70 views

Change 'Categories' to 'Topics'

I'm trying to find a way of displaying 'Topics' rather than 'Categories' and so far not being very successful. I tried this: function translate_category($translated) { $translated = str_ireplace('...
1
vote
1answer
101 views

Should I change text-domain of TGM library inside theme?

I created a theme and I want to publish it in wordpress.org. I used TGM library to check to require plugins. but the Theme-check get bellow warning: Warning: More than one text-domain is being used ...
7
votes
3answers
13k views

generating po mo translating files from scratch in a wordpress theme

Maybe I'm missing something here but I really can't find any answer to my question around the web. I am creating a new wordpress theme from scratch (literally from scratch) and would like to create ...
-1
votes
1answer
29 views

WPML & Events Manager translatable fields after duplication

I have created a WordPress site with WPML and Events Manager together. I want to create events in a language and then translate it to my second one. That's easy but I can't seem to find where I change ...
0
votes
1answer
158 views

Found a translation function that is missing a text-domain. Function _n

I am getting this error? Found a translation function that is missing a text-domain. Function _n can this be fixed? how can the translation be done in this case? if( count($value) < $field['...
0
votes
1answer
14 views

How to get custom translations from child theme to be loaded?

I have a child theme that loads translations normaly but if i added custom translatable strings that doesn't exist into the parent, how to add these strings to the main po file or how to load it ...
1
vote
1answer
43 views

Change template copy with po/mo files

I just got my hands on a WordPress site and i'm trying to edit some words from a theme login template, so I went to cPanel to check how the theme templates handle the copy and I found the pt_PT.po ...
0
votes
1answer
364 views

Can't translate the post meta data (Date) in another language

I want to translate the post meta data (date) in chines language for example, September 13, 2017, should be translated as 2017年9月13. But my code gives it in English. Do you see any error? Please help. ...
0
votes
1answer
58 views

Translation ready code format for taxonomy

https://codex.wordpress.org/Function_Reference/register_taxonomy i have these doubts _x( 'Categories', 'taxonomy general name' ) does it make taxonomy general name a text domain? wont it resulting ...
1
vote
2answers
94 views

Multiple text-domains per single plugin - admin and frontend

There is a plugin: In admin area it has about 300 various strings added via __('', 'my-textdomain'). Most of these are form labels, titles, etc. On "frontend" (which end user sees), there just 15 ...
2
votes
1answer
81 views

Make changes to translation?

I'm using finnish translation of wordpress. I found the fi.po file which contains all the translations, but for some reason, editing the contents wont edit the contents of the page. Can I make ...
0
votes
1answer
564 views

WooCommerce does not translate every string

So I have an issue with WooCommerce translation to German language - basically it does not translate every single string. I'm using a child theme of "Neighborhood" theme and we have a plugin Loco ...
0
votes
1answer
22 views

How to 'manually' load translations/test domain outside theme context?

So I need to build a pdf file starting from a php/html template (currently using mpdf library). So my-pdf-template.php file will never be shown on the website frontend, and sits on the main theme's ...
2
votes
1answer
57 views

Do i have make the content() also translation ready in theme?

I am trying to understand things needed to make theme translation ready.Things below are not clear for me Which content of theme are to made transnational? Are title,customposttype and content are be ...
9
votes
2answers
2k views

How to get a traslated string from a language other than the current one?

I was wandering... All the translation functions (__(), _e(), _x() and so on) use the current/active language. Is there a way to get a translation from another language than the current one? For ...
0
votes
1answer
308 views

How to translate custom Divi module using POEDIT and Polylang [closed]

I am using Divi theme and Polylang plugin. I use Polylang to add Bosnian language (bs_BA). I know how to register strings for Polylang and translate them that way, but I can't manage to do plurals ...
1
vote
2answers
243 views

How to override default Wordpress core language file

I am experiencing a small problem and I have tried several solutions, but none of them has worked unfortunately. Perhaps somebody has a clue why :-) I am using the Syntax theme from Automattic which ...
1
vote
0answers
38 views

How can i merge the translations from one .po file into the source on another .po file?

I'm creating a survey in several different languages and so have two .po files, one has the questions and the other has the translations. I wanted to combine the files so the translations are copied ...
-1
votes
2answers
274 views

ACF + WPML: How to translate date fields?

I'm trying to translate the month name outputted by an ACF date field. How do I get the Spanish versions of those month names? Here's an example of my code: $start_date = get_field('start_date'); $...
35
votes
5answers
96k views

Translate a plugin using .po .mo files

I want to translate this plugin. The plugin has already been translated into other languages and it has .pot files for adding new languages (as far as I understood from description). How do I create ...
-1
votes
1answer
75 views

Auto translate plugin text-domain [closed]

I'm searching for a plugin that automatically translate plugins. I don't want plugins like polylang or gtranslate, I don't want to have more than one language in my website(The website has only one ...
0
votes
0answers
21 views

How to deal with differently translated prepositions?

I'm maintaining a Wordpress site in both English and Portuguese. I'm using .po and .mo files. The site is related to elections. In English, you can always say "Candidates in {{state}}". In ...
1
vote
1answer
383 views

Fetch ID's associated with a custom post type when translated with WPML?

I've created a custom post type (roomtype). Now these roomtypes has post id 272 (single room in swedish) and 350 (double room in swedish) I've made it translatable (with WPML) and created in english. ...
0
votes
2answers
45 views

Wordpress Baskerville 2 translation

I don't understand how translation works in Wordpress. I made my first wordress using Baskerville 2 theme and I would like it to be translated in French. How does it work ?
0
votes
2answers
3k views

Using polylang, how can I see which post is the “original” and which are the “translated children”?

I am using Polylang. It is not obvious to me how the relationship between posts are established. I can switch between different language versions of the same post, and I can tell that they're (...
0
votes
1answer
111 views

How to Convert Date to Thai

The Thai text I want to end up with is: อาทิตย์ 03 มกราคม 2016 to อาทิตย์ ๐๓ มกราคม ๒๐๑๖ I don't think it should matter what language but in this case it is Thai. My function is: $strdate = ...
0
votes
1answer
7k views

mo / po translation files does not seem to work

I have a theme that was bought from themefuse and they say it supports localisation using a plugin called CodeStyling Localization However even though I make the necessary steps to translate strings ...
0
votes
1answer
64 views

Conditionally change Wordpress core language

I need to change the wordpress language conditionally. So I use the code: //Change Site Locale function wpsx89972_redefine_locale($locale) { if .....my condition exists... { $locale = 'en_US'; } ...
2
votes
1answer
30 views

What is the way to ship read-me strings like plugin-strings for internationalization?

I want to translate my plugin for non-English languages. But for readme strings, I could find the only option to submit translations over translate.wordpress.org. Is there any way like the one ...
1
vote
0answers
74 views

What can be reason for no plugin-strings available under stable section on translate.wordpress.org?

I cannot see any plugin-strings under the stable section on translate.wordpress.org. What can be reasons for that? P.S.: Under development section, I can see all the plugin-strings.
1
vote
3answers
985 views

Is this a correct usage of esc_html_e?

<h1 class="page-title"><?php esc_html_e( 'Oops! Something went wrong.', '_amnth' ); ?></h1> I think this should simply use the __() function, since it's a static string and it ...
0
votes
1answer
160 views

WordPress i18n in Array throws Error

i am wirting my very first plugin. For publishing it to the repository i want to make it translatable. On my options page i some arrays, which store the default settings. Somehow i get an error when ...
0
votes
1answer
1k views

How to translate functions.php?

I am working on functions.php in a child theme, Here I have a CPT and custom taxonomies for my project. The only thing I need to translate taxonomies and CPT right from the functions.php and be sure ...
2
votes
1answer
1k views

Why can I not use a class constant as text domain?

What makes Wordpress.org make an internationalization of a plugin approved? I've created my first plugin and here's the main code: https://plugins.trac.wordpress.org/browser/mastercurrency-wp/trunk/...
8
votes
2answers
3k views

Is a text-domain necessary for a child theme

Sorry for the noob question. Is a text-domain necessary for a child theme? I am building a simple child theme with no text-domain declared. So, when I use strings which are to be translated, should I ...
4
votes
1answer
2k views

Set language per post

I have a bi-lingual blog with English as the main language and Arabic. Currently I use the post "Custom Field" to indicate that the post is Arabic and I use that in my child theme to change the ...
0
votes
1answer
374 views

wordpress plugin translation not working

I have no idea what is wrong here. First I would like to share probably all required info. Plugin tree: $ tree . ├── classes │   ├── database │   │   ├── plugin-auth.php │   │   ├── plugin-user.php │...

1 2
3
4 5
10