String translations stop working
-
Hello,
I have problem with string translation. All translations lost and I wrote them again but still is not working. Everything still appears like the plugin is not intalled at all!
The page I need help with: [log in to see the link]
-
I also found another topic with a relative problem and I tried a code you suggested with my theme name, but it didn’t work again.
I tried this code:
add_filter(‘ttfp_domains’, ‘custom_ttfp_domains’, 10, 1);
function custom_ttfp_domains(array $domains)
{
$domains[] = “setsail”;
return $domains;
}and also this one:
add_filter(‘ttfp_domains’, ‘custom_ttfp_domains’, 10, 1);
function custom_ttfp_domains(array $domains)
{
$domains[] = “setsail-child”;
return $domains;
}Hello @elliv1989, can you send a php+html code snippet with translation problem?
I can’t understand what exactly you need.
Although I’ll upload some images with the problem.
I translated all strings in string translation but everything are in default theme/plugin language
Img-1: https://ibb.co/V2G5qt0
Img-2: https://ibb.co/6bCTMKg
Img-3: https://ibb.co/Thk2xfy
I need code snippet with print function in your theme 🙂
like: <?php _e(‘text’, ‘my_theme’); ?>
and screenshot from admin dashboard:
Languages -> TTfP Settingsah ok, you mean something like this one
<h3 class="qodef-tour-plan-title"> <?php esc_html_e( 'Tour Plan', 'setsail-tours' ); ?> </h3>
You can find screenshot from settings here:
and a screenshot from the code here:
this code is from a theme’s plugin, the setsail tours, because the example in the screeshot I sent with strings like “INFORMATION” TOUR PLAN” etc are in this plugin, my theme’s name is setsail
ok, thanks.
your domain text name is: “setsail-tours” – it is different than theme name, so you need update your filter like this:
add_filter(‘ttfp_domains’, ‘custom_ttfp_domains’, 10, 1);
function custom_ttfp_domains(array $domains)
{
$domains[] = “setsail-tours”;
return $domains;
}and next select this text domain in your settings page: https://ibb.co/1rxM15h
No, I already write it to previous answer.
My Theme name is setsail.
The screenshot is from plugin please read my answer above
see also the screenshot
And my theme name is setsail look here
- This reply was modified 1 year, 12 months ago by elliv1989.
@elliv1989 in parallel, I made an update: new version on plugin is 3.3.3.
This update include text domain from selected themes and plugins. I noticed that sometimes these names are different: text domain and theme name. Please update the plugin and let me know if everything is OK 😉
Still not working… I really can’t understand why
I want to help you.
I need more details… this translation is not working: https://ibb.co/Thk2xfy yes? this is from plugin “main”. Can you show me code snippet where is print text: “TOUR PLAN” ? Or can you show me other text with: code snippet, screenshot from admin panel with string translations (Languages->Translations) and settings page(Languages->TTfP Settings). I need a full information on a specific text example.ok sure, thank you, I appreciate it
so we have this string for example: https://ibb.co/s9yLq8m
the code: https://ibb.co/zhbfMcR
the string translation: https://ibb.co/6ysFJX7
the languages: https://ibb.co/6yCtdHC
and the settings that I just notice that setsail-tour plugin disappeared: https://ibb.co/kJ2CDnC
- This reply was modified 1 year, 12 months ago by elliv1989.
@elliv1989 please update your filter like this:
add_filter(‘ttfp_domains’, ‘custom_ttfp_domains’, 10, 1);
function custom_ttfp_domains(array $domains)
{
$domains[] = “setsail-tours”;
return $domains;
}I think this will solve the problem.
I did, but still nothing changed! I can’t understand!
I disabled all other plugins, still the same problem, I visited the page from incognito but again the same problem!
I really can’t understand why it is not working
can you confirm that you have selected ‘setsail-tours’ on the settings page?
https://imgbb.com/kJ2CDnC (section: “WordPress core and admin domains”)
- The topic ‘String translations stop working’ is closed to new replies.