Hello ! Thirst of all, thank you for your wonderful work on this plugin which is working quite well !
I recently try to use Import/Export functions of the plugin (from TTfP Settings page), and I see two majors problems :
I hope you could add these suggestions in this plugin to get it better !
Thank you !
]]>Hi there!
I read this topic and tried to search in internet, but couldn’t find any answer to this problem.
403 Forbidden when trying to update string translations | www.ads-software.com
I am not having the “bizarre” problem this user is describing, I just can’t update any string. The web is new, with Kadence theme, it has less than 10 plugins installed. So… I don’t know what is happening.
All other things with the plugin are working correctly.
Any clue?
Thank you!
]]>I selected the plugins and exported them.
First I tried to import 8000 lines with 8 languages ??but I got a 504 error.
When I upload a csv file with 500 lines and 1 language I see “Translations updated. Items: 0.”
In order not to get a 504 error;
How many languages ??can be imported at the same time?
How many lines should the CSV file have at most?
Some plugins (not all) appear to be translated but I don’t know which ones were imported because I keep getting a 504 error.
]]>Patch: https://gist.github.com/oxyc/5ed770d8c8e05b7261d328e66cbd9fa6
Let me know if you have a public repository for this since I frequently need to patch it manually and your mixed CRLF line endings are a real headache.
]]>Hello,
I migrated from Polylang Theme Strings by Modewine (that is not maintain anymore) to TTfp.
When I disable Polylang Them Strings, TTfp can see all string my previous string admin and translations are filled. But translation don’t show up in front.
I’ve tried to create a new string that wasn’t exist before the migration, and if I fill all language, they will show up in front …?
Any idea how can I resolve that ?
Thanks
]]>Hi,
It seems that you have not taken into account the translations of message strings using JavaScript.
In a “.js” file I use the function “__(‘Back’, ‘hitemplate’)” but this text does not appear in the list of translations. I have also tried to put a text that I am using in the PHP part, but it does not translate it either. For example, “__(‘Close’, ‘hitemplate’);” shows the translated text from PHP, but from JS it always shows “Close”.
Am I making any mistakes? Is it possible to make it work?
Thanks in advance for your help
]]>Hi,
there seems to be a problem with string translations of contact form’s confirmation messages like “Thank you for your message. It has been sent.”. When I try to fill out and send a German or English contact form I always get this message in Polish. What could be the reason of this?
Thank you in advance for your help
]]>Hello,
There is a breaking change in your last update regarding topic: https://www.ads-software.com/support/topic/wp-6-6-and-requires-plugin-header/
The header is added but it does not consider the use of polylang-pro !!!
When updating your plugin WordPress will auto disable this plugin for all websites that use polylang-pro plugin and will not allow users to activate it as the dependency is not met.
This could break all sites that use your plugin in combination with polylang-pro, without the users even noticing. Please fix this asap, before to many users are affected.
WordPress has provided a filter specifically for this “premium” plugin feature.
It is at the the bottom of the instruction page that was also shared in the previous support item, under title “New filter” https://make.www.ads-software.com/core/2024/03/05/introducing-plugin-dependencies-in-wordpress-6-5/ (I tried to add screenshots but those fail to upload)
You should use the new Requires Plugins header if you make your plugin ready for the actual WordPress version.
]]>So i’m using TTFP + Polylang on website with multiple languages like EN, PL, DE etc. – thing is, that after checking option:
Force translate admin dashboard: Translate admin dashboard to default polylang language [pl]
the admin post listings stops showing other language posts altogether, unless i switch to the actual language.
“Show all languages” should show all languages in posts listings, but option(in TTFP) prevents that and shows only default language posts.
That for one and second thing – maybe set that option to “none” by default after installing plugin.
]]>When I configure TTfP for translating the admin dashboard according to user preference, it affects the content as well – i.e. it will only display content that matches the language set in the user configuration, even when “Show all languages” is selected in the Polylang top bar widget.
I’ve done a bit of detective work here, and this is what I can determine:
a) When I disable the option, things are normal: “Show all languages” displays all languages as expected, and selecting a language from the widget displays that language only.
b) When I enable the option and switch my user UI language preference to one that matches one of the website content’s languages (.e.g have Polish and English, select Polish), only content for that language is listed regardless of Polylang widget selection.
c) When I enable the option and switch my user UI language preference to one that does not match any of the content languages for the website (e.g. have Polish and English, select German), content for all languages is shown regardless of Polylang widget selection.
]]>When I go to list my pages (I use Nested Pages) and select only one language, the list also gets translated to that language.
Sadly, while I have to edit German pages, I don’t know German myself, so it’s a pain in my behind when UI gets switched to that as well.
It’s essentially the same problem people have had recently (from what I can see from other issues).
You added two options for translating the backend: to Polylang default, and to language provided by slug (I assume this means that it’s based on the URL, i.e. &lang=…). By the way, that option is misnamed, because it doesn’t actually translate to the user’s language (as set in the user profile) – it translates to the language currently selected in the Polylang backend language selector on top of the admin UI.
Could you please add a third option? Something like “Honor the language selected in the user’s profile” maybe?
Please and thank you.
]]>Hi, I have a problem with the latest WooCommerce updates, I use Polylang PRO + Polylang for WooCommerce and the site is in French/English.
FR orders appear in the Woo administration but EN orders are not displayed. The orders counter indicates the presence of all FR+EN orders (6) but the list only displays FR orders (4), the language menu is on “all languages”.
I can give you admin access to the dev site.
Regards.
Jean
Hi, thanks for a great plugin!
I just found a little inconvenience. When joining strings like this 'foo'.pll__(...)
, the translated string doesn’t get recognized, only when there’s a space around the dot like this 'foo' . pll__(...)
.
Here’s a demo with your regex
WordPress 6.4.2
Polylang 3.5.3
TTfP 3.4.1
Thank you!
]]>Hi, I did an update to latests all and I am getting an error
PHP Fatal error: Uncaught Error: Call to undefined function get_plugins() in … wp-content/plugins/theme-translation-for-polylang/inc/theme-and-plugin-support.php on line 94
PHP 8.1, WP 6.4.2 and TTfP 3.4.0
I “fixed” it with:
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
Hi guys, is there a way to avoid having to translate all countries for the woocommerce dropdown on checkout? At the moment I’m seeing the countries listed as translatable strings but they’re all “translated” into English for all languages on the site.
]]>So we are loading ACF Pro inside our theme. When I select in TTfP settings my theme text domain “sikpre ( Theme Name: ?ikmo premium – previo.cz , Text Domain: sikpre )” and save, in translations I also see ACF Pro strings as my textdomain “sikpre”.
Is this correct behaviour?
]]>So I have string “Search” – see below. But it seems WP Core also has this exact string. So in translations I can see “TTfP: WordPress: Core” string. When changed, my string for my text domain is also translated.
Is this correct behaviour?
<?php _e( 'Search', 'sikpre' ); ?>
WP 6.4. 1
TTfP: 3.4.0
Hello,
I’ve installed Polylang on a locally developed site for FR (default) / EN translation.
Everything works perfectly: my articles are translated, pages as well, the language switcher is operational, my categories and tags are translated…
Through the block editor, I took care to create all my FR and EN templates.
On pages, the template switch works perfectly on the site’s pages, except for the page that displays the posts and child pages…
My configuration : My WordPress site is configured with a custom-built block theme.
I’m using ACF + Loop and Logic plugins.
I’ve been stuck on this issue for two days, and I need help to understand where the problem is coming from. Should I add code to my function.php file to make my theme apply the correct template? But where can I find the template’s slug? I only have the name I’ve defined in the editor…
Thank you for any assistance…
]]>Hello,
I’ll be wonder if it could be possible to create filter, or add a setting in the plugin configuration in dashboard, to choose wich capacity of user to use in this function (file theme-translation-for-polylang.php) :
function process_polylang_theme_translation() {
if (Polylang_TT_access::get_instance()->is_polylang_page()) {
if (Polylang_TT_access::get_instance()
->chceck_plugin_access() && current_user_can(‘manage_options‘)) {
$plugin_obj = new Polylang_Theme_Translation();
$plugin_obj->run();
}
}
[…]
}
I would like to use “edit_posts” capability and not “manage_options”.
Is it possible for you to add this functionnality ?
Thank you !
]]>Hi, I’ve found a very serious bug in the latest versions. Ttfp plugin interferes with taxonomies and tags. For example:
I have set my Italian language as main language. If I open an article in the English version, the tags and categories that will appear will be those related to the view panel language and not those related to the real language of the article. This means that if I save the article I lose the old association. I am attaching supporting screenshots.
https://lab12.envisiongroup.it/screen_1.png
https://lab12.envisiongroup.it/screen_2.png
Version 3.4.2 | Polylang
Version 3.3.5 | Theme and plugin translation for Polylang (TTfP)
Hi,
I’m trying to translate my main website title, but I’m unable to do it. I’ve create custom settings for my page.
Code used in functions.php
function aurora_customize_register( $wp_customize ) {
// Do stuff with $wp_customize, the WP_Customize_Manager object.
/* Pinegrow generated Customizer Controls Begin */
$pgwp_sanitize = function_exists('pgwp_sanitize_placeholder') ? 'pgwp_sanitize_placeholder' : null;
$wp_customize->add_section( 'aurora_default_cs', array('title' => 'Personnalisation de la page d\'accueil'));
$wp_customize->add_setting( 'home_img', array(
'type' => 'theme_mod',
'sanitize_callback' => $pgwp_sanitize
));
$wp_customize->add_control( new WP_Customize_Media_Control( $wp_customize, 'home_img', array(
'label' => __( 'Image de l\'accueil', 'aurora' ),
'type' => 'media',
'mime_type' => 'image',
'section' => 'aurora_default_cs'
) ) );
$wp_customize->add_setting( 'home_vid', array(
'type' => 'theme_mod',
'sanitize_callback' => $pgwp_sanitize
));
$wp_customize->add_control( new WP_Customize_Media_Control( $wp_customize, 'home_vid', array(
'label' => __( 'Home video', 'aurora' ),
'type' => 'media',
'mime_type' => 'video',
'section' => 'aurora_default_cs'
) ) );
function allow_video_upload( $existing_mimes ) {
$existing_mimes['mp4'] = 'video/mp4';
$existing_mimes['mov'] = 'video/quicktime';
// Ajoutez d'autres extensions de fichiers vidéo si nécessaire
return $existing_mimes;
}
add_filter( 'mime_types', 'allow_video_upload' );
$wp_customize->add_setting( 'main_title', array(
'type' => 'theme_mod',
'default' => '',
'sanitize_callback' => $pgwp_sanitize
));
$wp_customize->add_control( 'main_title', array(
'label' => __( 'Titre principal', 'aurora' ),
'type' => 'text',
'section' => 'aurora_default_cs'
));
$wp_customize->add_setting( 'sub_title', array(
'type' => 'theme_mod',
'default' => '',
'sanitize_callback' => $pgwp_sanitize
));
$wp_customize->add_control( 'sub_title', array(
'label' => __( 'Sous-titre', 'aurora' ),
'type' => 'text',
'section' => 'aurora_default_cs'
));
}
function register_theme_strings() {
pll_register_string('aurora', get_theme_mod('main_title'), 'aurora', true);
pll_register_string('aurora', get_theme_mod('sub_title'), 'aurora', true);
}
add_action('init', 'register_theme_strings');
And in my front-page.php
$main_title = get_theme_mod( 'main_title' );
$sub_title = get_theme_mod( 'sub_title' );
<div class="home-title">
<h1><?php pll_e($main_title); ?></h1>
<h2><?php pll_e($sub_title); ?></h2>
</div>
Any idea how it can recognize that?
]]>I noticed problems when using it with ACF PRO and the gallery field.
With your plugin activated, the gallery field not work in translated posts (it is empty)
/**
* Find strings in themes.
*
* @return array
*/
public function run_theme_scanner() {
$data = [];
$themes = wp_get_themes();
$settings = Polylang_Theme_Translation_Settings::getInstance();
foreach ($themes as $name => $theme) {
if (in_array($name, $settings['themes'])) {
$data[$name] = $this->register_stings_from_dir($theme->theme_root . DIRECTORY_SEPARATOR . $name . '/templates', $name); // add filter here
}
}
return $data;
}
All my views are in templates directory. If I scan theme I have a lot of differences string not from my domain.
Or you can add input before settings to include or exclude director from root theme. Example (with common separations):
Include: templates, src
Thanks for develop your plugin.
]]>WP: 6.2
TTfP: 3.3.4
When I open TTfP settings, I get a bunch of file not found errors for plugin directory scans. Screenshot: https://imgur.com/a/8H1lkza
]]>CONSOLE LOG:
pll_block_editor_plugin_settings.lang is undefined
FILE: block-editor-plugin.min.js
]]>Hi there,
I would like to report an issue regarding the new pll_admin_current_language setting/filter. It appears to have an unexpected behavior, where the filter sets the admin languages to null if the setting isn’t used and the lang parameter isn’t in the request. This is the case most of the time in our situation.
As a result, all the languages are loaded when there is a language specified in the admin menu, which is not the intended behavior.
Thought I would share this here, can’t imagine we are the only ones facing this issue. We fixed it by removing the filter for now.
]]>Hi, is it possible to add the function “esc_html__” to the search function? I’m trying to translate Gravity Forms string, but they seem to use the function “esc_html__” for there labels in there plugin.
This function is not includes in this plugin it seems.
Is this possible? Or would this give issues?
Thanks in advance!
Hi,
I installed your plugin and it works fine with other plugin but not with my custom theme, in the translation page i can see the string that i want to translate but in the frontend I cant see the changes.
I attach below the translation setting, the ttfp setting and also the part of code that i want to translate.
Where am I doing wrong?
add_filter( 'woocommerce_catalog_orderby', 'misha_change_sorting_options_order', 5 );
function misha_change_sorting_options_order( $options ){
$options = array(
'title' => __( 'ordine alfabetico', 'woocommerce' ),
'price' => __( 'Prezzo crescente', 'woocommerce' ),
'price-desc' => __( 'Prezzo decrescente', 'woocommerce' ),
);
return $options;
}
]]>
Hi, my site language is “English”, admin user is using “Site default” language, web is translated into Czech & German, via Polylang.
After upgrading from 3.2.13 to 3.3.3, I am experiencing a following weird behavior: admin backend seems following order language?
Example – when admin i just in woocommerce order overview, all backend is in english (which is expected and correct):
But when opening details of individual german order, then the admin backend becomes partially translated into german:
Such behavior is imho not correct (at least in 3.2.13 this was not happening – there admin was always in user language). I tried to activate/deactivate all modules in ttfp settings, but seems not affecting it.
Expected behavior: the admin backend shall be always in admin user language, shall not follow the language of individual orders..