Archived topic
Change Leave comment area language
16 replies · Started by omar on October 6, 2016
I just started using this theme for one of my Arabic RTL blogs , and I am loving it , Thanks Tom .
I want to change leave a comment area language to arabic and align it to the right .
Also I want the same thing for left search box and Archive left sidebar .
How can I do this please ?
In order for the theme to be translated to Arabic, the translations will need to be added here: https://translate.wordpress.org/projects/wp-themes/generatepress
That would be amazing if you could do so, as I'm sure it will help a lot of other people as well.
Let me know if you have any questions :)
I just want to change leave a comment area to arabic and align it to the right .
I know basic HTML/CSS . Can you please help , how can I edit it / which files to edit ?
The theme picks the translations directly from the WordPress official repo.
Add them there and they will automagically appear on your site after you update the translations.
I also miss the POT files but that's the way it is right now.
Thanks Roberto but then I will have to change Wp panel language for theme to translate ? right ?
Can I change the theme translation while keeping Wp panel in English ?
You translate GeneratePress in WordPress website: https://translate.wordpress.org/projects/wp-themes/generatepress
You need to register and ask for access to those translations (It is not very user friendly, be patient)
If you want different languages for the admin panel, then you should set that in the "User" options.
Roberto is 100% right about the translations - they need to be done there on WP.org.
As for the alignment - just checking it out now and everything in the comments area seems to be aligned to the right? Can you show me a screenshot of what's not aligning?
It seems translating on WP will take some time to reach 100 % .Cant I use Poeditor or any other way to just translate what I need fast ?
You can use a child theme: http://docs.easydigitaldownloads.com/article/1228-how-do-i-translate-my-theme-from-child-theme
Or a plugin like this: https://en-ca.wordpress.org/plugins/say-what/
So I have followed everything in the guide and then exported the generatepress translation files po & mo . (They had the specific translation I wanted ) , changed their names to ar.po , ar.mo and uploaded them in child languages folder .
Changed the theme to generatepress child and the language to Arabic .
But no changes have taken place in !!
In your function, did you change parent-theme-slug to generatepress?
Yes sure ,
<?php
/**
* Generate child theme functions and definitions
*
* @package Generate
*/
/**
* Loads the child theme textdomain.
*/
function wpdocs_child_theme_setup() {
load_child_theme_textdomain( 'generatepress', get_stylesheet_directory() . '/languages' );
}
add_action( 'after_setup_theme', 'wpdocs_child_theme_setup' );
?>
Looks good to me.
And your .po file is in the languages folder of your child theme?
If that's not working, you might be better off going the Say What plugin route.
Thanks all , it works now !!
After many trials the translation worked when I added a copy of translation files in parent GeneratePress .I wonder why is it the case although I had them in Languages file in the child theme ?!
If the theme update , Will I have to do this again ?
Yes you will, WP removes the generatepress folder and uploads the new one when doing updates.
That code above is supposed to use the child theme folder instead of the parent folder, not sure why it's not working for you.