Switching Language
-
Since I’m using Elara for a blog that will be written in a different language than English, is there any way that I can change the language for buttons, the comments section etc?
Thank you!
Camilla
-
Hi Camilla,
Thank you for getting in touch with us.
In order to show the words in another language, you’ll need to translate the theme. Following are two great resources that can help:
https://thethemefoundry.com/blog/translate-a-wordpress-theme/
https://premium.wpmudev.org/blog/how-to-translate-a-wordpress-theme/Loco Translate is also a great plugin that can help you translate your theme: https://ww.wp.xz.cn/plugins/loco-translate/ It provides in-browser editing of WordPress translation files.
Kind regards
Hi again,
I’ve tried following the tutorials and still can’t get it to work.
I’m using the Poedit software and uploading my translated file to the “lang” folder in the theme directory and this doesn’t work.
I’ve looked through and followed both of the tutorials you sent links to as well as the loco translate plugin, and nothing seems to be working…Hi @camillapop,
Could you please contact us via our support system here: https://www.lyrathemes.com/support/.
I am not allowed to ask for your site’s details here, which would let me help you out.Kind regards
I guess you should write a guide, Jarektheme, because I need the same thing of Camillapop and, following your links, nothing works. :\
Also, for example, why there’s no strings like “search” in the language file? I’ve set my WP site in italian (general>language), but still see “search” inside your theme. In the top bar and sidebar.
Hi @locksoft,
Have you tried to install and use Loco Translate plugin: https://ww.wp.xz.cn/plugins/loco-translate/
This is the easiest way to translate theme. Here you can find documentation on how to use it: https://localise.biz/wordpress/plugin/beginnersKind regards
Yes Jarek.
It doesn’t recognize the theme as localizable but, after I’ve set the “lang” directory in advanced features then I can start translating the fields.But nothing changes after I’ve saved the new localization.
I’ve followed the exact guide you linked. Files are inside Elara directory (still not sure if it should be “lang” or “language”, I’ve added them both), but the WP website still shows everything in english.
https://www.dropbox.com/s/om4qlxbpux36vjd/WP_Elara.png?dl=0
-
This reply was modified 7 years, 4 months ago by
Lock.
I found the cause of this issue. To fix translation please follow this steps:
1. Download updated .pot file from here: https://app.box.com/s/op2qiqwl47bqfaf3tbjft1uh77ffksyp
and upload it to wp-content/themes/elara/lang folder on your server. It will replace the old file.2. Click Update from code in PoEdit app or update in Loco Translate plugin.
3. Open wp-content/themes/elara/functions.php file and find this line:
load_theme_textdomain( 'elara' );You need to replace it with this one:
load_theme_textdomain( 'elara', get_template_directory() . '/lang' );The default Elara language file is
langso it should work.
We’ll update Elara as soon as possible with these changes so you will not lose those changes.Kind regards
Great Jarektheme, everything is working perfectly now. 🙂
Many thanks for your quick answer, have a nice day.
-
This reply was modified 7 years, 4 months ago by
The topic ‘Switching Language’ is closed to new replies.
