- This topic has 5 replies, 3 voices, and was last updated 7 years, 2 months ago by plimfec.
- AuthorPosts
- March 19, 2017 at 2:21 am #2432MyriamParticipant
Hello,
How can I change the “read more” (english) button into “en savoir plus” (french) ? I’m talking about all the posts and not about the homepage. Thank you !
March 20, 2017 at 10:57 pm #2449HashKeymasterYou can do it by translating it to your language using this plugin https://wordpress.org/plugins/loco-translate/
Please check the documentation of the plugin to find out how it works.
March 26, 2017 at 1:19 am #2591MyriamParticipantThank you 🙂
March 26, 2017 at 8:32 pm #2598plimfecParticipant@ Myrian:
Did you try already? And did you succeed?—
Here it’s not working at all. I’m able to edit the files using the plugin mentioned above, but the changes don’t show at the front of the website.
So, the next step was trying to change the language file (total.pot) using the program Poedit (like I use to do with other themes), but that’s not working either. No changes visible at the front.
I tried all locations on the server to put the language file. In my child theme, in the original Total folder, even in the WordPress folder: ‘wp-content\languages\themes’ (sometimes this works, like it does for the old Twenty Eleven theme).
I’m out of ideas, so any help is highly appreciated.
—
Btw Poedit gives a syntax error concerning ‘nplurals=INTEGER; plural=EXPRESSION;’ when I try to save the language file after changing it. I replaced it with the right one (I suppose):
nplurals=2; plural=(n != 1);
… and the error disappeared.
But still no luck with the language file.
Are we sure everything is allright with that file?April 3, 2017 at 11:12 pm #2676HashKeymaster@plimfec The loco translate plugins should work. or you can make a copy of content-summary.php file in your child theme and then change the text in the code file.
You will have to create a folder template_parts and then content-summary.php file. Copy the content of content-summary.php from parent theme to child theme and then edit the text.
April 4, 2017 at 6:25 pm #2699plimfecParticipantI’m aware of the option to change the ‘read more’ text through the php file, but I prefer to change the language file instead. And I’d love to use the program Poedit for it, because this would prevent the necessity of adding another plugin to the WordPress backoffice.
Also: I’d like to translate all kind of English words and phrases throughout the website, not just that particular button text. Changing all of these through the code files, would result in a too big child theme.
But thank you for the suggestion, for translating just one button text, it would certainly do.
I think i’ll give the Loco translate plugin another try. I must have overlooked something I suppose..
- AuthorPosts
- You must be logged in to reply to this topic.