Terribly rigid plugin/Translate press
-
Dear Adispiac,
This is my website: [ redundant link removed ]
It was built with the Laurel theme by Solo Pine via Envato Market.I can’t see any button to switch between the languages. I can therefore only add text via settings > translate press > translate site.
And although I’ve translated the texts under the three main buttons (researcher with integrity, etc), if I open the English website, I still get the Dutch text.
On the website are blogs on different topics, some are written in Dutch, others in English. So not all content on my website is in both languages. Translate press seems unable to deal with that.
The other issue is that I find it impossible to insert links in the second language. For instance the page about me (/over-bureau-schrijfkracht/). The English page has links that should go to English pages on the English site. But in fact, I couldn’t insert any links at all.
I hope you can prove me wrong.
Thanks,
Paulien
The page I need help with: [log in to see the link]
-
Hello Paulien,
Thank you for your willingness to change your opinion regarding TranslatePress.
>I can’t see any button to switch between the languages. I can therefore only add text via settings > translate press > translate site.
This is the only way to translate using our plugin – via the translation editor.
TranslatePress does not create new separate pages for each secondary language, it works at string level.
>And although I’ve translated the texts under the three main buttons (researcher with integrity, etc), if I open the English website, I still get the Dutch text.
It seems that you get redirected to the Dutch version of those three articles.
Please enable the “Force language in custom links” setting from your TranslatePress general settings and let me know if it redirects you properly.
>The other issue is that I find it impossible to insert links in the second language. For instance the page about me (https://www.schrijfkracht.nl/over-bureau-schrijfkracht/). The English page has links that should go to English pages on the English site. But in fact, I couldn’t insert any links at all.
You should be redirected automatically based on the chosen language, please enable the setting mentioned above and let me know how it goes.
Keep me updated regarding this matter!
Best wishes,
Dear Dragos,
Thank you for your help.
The “Force language in custom links” setting does seem to help with the promo boxes. But this page still remains in Dutch: /en/over-bureau-schrijfkracht/
On the page References, I would like to insert different references for the Dutch reader and different ones for the English page: /en/referenties/. I’m guessing I can only make a link in the left column by copying the html-code from the Dutch version? And the English speakers will remain hidden under the Dutch names?
Also this issue remains unsolved: On my website there are blogs on different topics, some are written in Dutch, others in English. So not all content on my website is in both languages. How do I make it possible to have some columns in one lange and other ones in the other?
Thanks,
Paulien
Hello Paulien,
>But this page still remains in Dutch: /en/over-bureau-schrijfkracht/
I assume that the page is fully translated.
Are you using a caching plugin?
If yes, please disable it and try translating again.
Also, take a look into your database’s tables and let me know if these strings have a translation.
Note: All translations are saved into the wp_trp* tables.
>On the page References, I would like to insert different references for the Dutch reader and different ones for the English page: /en/referenties/. I’m guessing I can only make a link in the left column by copying the html-code from the Dutch version? And the English speakers will remain hidden under the Dutch names?
You can use our conditional shortcode in order to display different content based on the chosen language.
Please let me know if this approach suits your needs.
>Also this issue remains unsolved: On my website there are blogs on different topics, some are written in Dutch, others in English. So not all content on my website is in both languages. How do I make it possible to have some columns in one lange and other ones in the other?
TranslatePress provides the framework that allows you to translate your site from one default language into multiple secondary languages.
Translations are unidirectional, you won’t be able to translate content written in a secondary language into the default language.This is why we highly suggest having your content written in one language before translating.
Please correct me in case I misunderstood any of your questions.
Best regards,
Dear Dragos,
In all honesty I had to look up with a caching plugin is :), but no, I don’t use a caching plugin. I’ve also checked and the English translation of the About Schrijfkracht-page is still there, when I open that page on the back side, it actually says it is visible (status: public, to be precise).
As for my database’s tables: where do I find that?You asked if I was okay using conditional shortcode. I’m just a writer with a website that has been forced to dive in to it a bit more, so again, I’m not sure what you mean. Is conditional shortcode what I did when I copied the shortcode on the one page and just changed the web address it referred to?
As for the last point: yes, I guess I wasn’t clear. I meant to say that not all the content in the first language needs to be translated into the second language. And that not all the content in the second language needs to be translated into the first. So I would like to have the flexibility to choose if I write a blog in Dutch or in English, without translating it into the other language. Is that possible with TranslatePress?
So far one issue solved, three more to go…
Thanks,
Paulien
Hello Paulien,
I’m sorry for the late reply – our work schedule is from Monday to Thursday.
>In all honesty I had to look up with a caching plugin is :), but no, I don’t use a caching plugin. I’ve also checked and the English translation of the About Schrijfkracht-page is still there, when I open that page on the back side, it actually says it is visible (status: public, to be precise).
As for my database’s tables: where do I find that?Can you please open a ticket on our support page?
We will have to investigate this issue in depth.
>You asked if I was okay using conditional shortcode. I’m just a writer with a website that has been forced to dive in to it a bit more, so again, I’m not sure what you mean. Is conditional shortcode what I did when I copied the shortcode on the one page and just changed the web address it referred to?
Here is an example:
[trp_language language="en_US"] //Reference written in English [/trp_language] [trp_language language="nl_NL"] //Reference written in Dutch [/trp_language]
Just wrap the references in the shortcode and only the one matching the selected language will be shown.
You can do this directly from your text editor.
>As for the last point: yes, I guess I wasn’t clear. I meant to say that not all the content in the first language needs to be translated into the second language. And that not all the content in the second language needs to be translated into the first. So I would like to have the flexibility to choose if I write a blog in Dutch or in English, without translating it into the other language. Is that possible with TranslatePress?
There are two ways to exclude pages from translation.
#1 Translate only certain pages add-on: https://translatepress.com/docs/developers/translate-only-certain-pages/
This experimental add-on lets you select which pages are translatable – however, it is still under development and your homepage will become untranslatable.
#2 Custom code
Create an empty plugin like this: https://gist.github.com/sareiodata/76f701e01db6685829db
Add the following code to the end of it:add_action( ‘plugins_loaded’, ‘trpc_exclude_tp_from_pages’, -1 );
function trpc_exclude_tp_from_pages(){
$do_not_translate_path = array(‘contact’);
$do_not_translate_path = array(‘home’);
$do_not_translate_path = array(‘test-page-page’);foreach ( $do_not_translate_path as $path ){
if ( !empty($path) && strpos($_SERVER[‘REQUEST_URI’], untrailingslashit($path)) !== false ){
add_filter( ‘trp_allow_tp_to_run’, function(){return false; } );
}
}
}
//Replace ‘home’ from $do_not_translate_path = array(‘home’); with what page you want to exclude from translationInstall this plugin via FTP (copy it inside wp-content/plugins) or create a zip archive with it and install it via the WordPress plugin upload functionality
Keep me updated!
Best regards,
Hi Dragos,
Sorry, now I took a long time. To be honest, you’ve totally lost me. On all accounts. I opened the link to a new ticket, but I’m confused, I thought I had already opened a ticket for support? And what is the question I should ask exactly at the Presale question page? Should I ask where my database tables are or something? Am I supposed to see a database that I’m not seeing?
Thank you for explaining to me what conditional shortcode is, but it goes way over my head. If I add the code, do I make different posts for every language and do I connect the page to the post in the particular language? Is that what you mean?
Than you mentioned there are two options for not translating a page. One that seems doable, however, you write: “This experimental add-on lets you select which pages are translatable – however, it is still under development and your homepage will become untranslatable.” So I’m guessing it is not really an option – but it might become one soonish? The other seems abacadabra to me.
Hope you can shed some light on all of this.
Thanks,Paulien
Hello Paulien,
> Thought I had already opened a ticket for support? And what is the question I should ask exactly at the Presale question page?
We need to investigate this issue in depth – this can’t be done on this forum.
Just open a ticket and add a link to this thread, I will take it from there.
>Thank you for explaining to me what conditional shortcode is, but it goes way over my head. If I add the code, do I make different posts for every language and do I connect the page to the post in the particular language? Is that what you mean?
You can display different content based on the chosen language, just insert both of the versions into your text editor and wrap them in shortcodes.
Please check the following screenshot:https://prnt.sc/szgcj2
In this case, “test1” will be displayed on the English version and “test2” on the German version.
> So I’m guessing it is not really an option – but it might become one soonish? The other seems abacadabra to me.
Yes, it should become an option pretty soon – unfortunately, I can’t give you an exact timeframe.
However, I can help you with the code option if you wish.
Best regards,
- The topic ‘Terribly rigid plugin/Translate press’ is closed to new replies.