Translation for wordpress theme "Tarski" - wordpress

I'm using the Tarski theme for a wordpress blog.
I want the blog to be french.
I looked at this page http://tarskitheme.com/help/localisation/, but I can't catch up how to use the .POT file to translate it in french.
I downloaded the file and opened it with geany, made all the translation, ex:
msgid "Search Results"
msgstr "Résultats de recherche
But then can someone explain to me what to do with this file?
I suppose I have to rename it to tarski_3.0-fr_FR.pot, but then where do I put it? Do I have to "compile" it somehow?
Thank you all.
EDIT
It seems that I must ask a question here to find a answer by myself, I just find that I must generate .mo file from the .POT
http://en.wikipedia.org/wiki/GNU_gettext#Translating
But I'm still don't know where to put this file... still searching.

You simply drop the .mo file in the root directory of your theme, and load the text domain. In your case, this last step is already done: the theme already loads its text domains (line 78 in functions.php, the function is load_theme_textdomain).
If you'd like a GUI for editing your translation and generating the .mo, try Poedit.

Related

How do I change wordpress texts

I'm pretty newbie with wordpress.
I already created my website based on template. I did couple changes on ".po" file, like:
#: wp-login.php:875 wp-login.php:950 wp-login.php:1010 wp-login.php:1112
#: wp-includes/general-template.php:324
msgid "Log in"
msgstr "Log into your awesome account"
...
#: wp-login.php:1347 wp-login.php:1391 wp-includes/general-template.php:466
msgid "Log In"
msgstr "Another Log In text"
None of them were changed. Why it happened?
.po files are for translations to other languages, not to change what is displayed by your templates.
To change texts that are part of template files, you have to change the according php files in the theme folder. But that's not a good idea, since next time the theme is updated, these changed files will be replaced by the new files and your changes will be lost.
So to avoid that, it's best to use a child theme and only include the files (as copies from the parent theme) where you want to make changes.
More on child themes here: https://developer.wordpress.org/themes/advanced-topics/child-themes/

How to add a file to wordpress theme from apparence->editor?

How to create a new file in my wordpress theme without using ftp client ?
thanks !
Using touch(); PHP function, which creates a new file in the specified directory. This is how I suggest doing it (and admittedly, there are cleaner ways, but this will get the job done, quickly and effectively)…
Open header.php — then write this code in the very top of the file:
<?php touch('wp-content/themes/YOUR_THEME_DIR/FILE_NAME.php');?>
Replace YOUR_THEME_DIR with the directory in which your WordPress theme lives.
Then, replace FILE_NAME with the name of the file you want to create.
Once that’s all done, save Header.php and go to the homepage of your site.
As soon as the homepage loads, it will create that new template or theme file.
Source :
https://www.webmechanix.com/how-to-create-a-new-theme-file-in-wordpress-without-ftp-access/
You can use a plugin called WPIDE found here https://wordpress.org/plugins/wpide/
This plugin will allow you to edit and add folder and files in your project.

How to update a wordpress translation file

I want to localize a wordpress plugin and translate it to Persian with POEDIT.
I created the fa_IR.po, fa_IR.mo and all the texts loaded but when I write the translation texts and save the file, nothing happens, and it still shows me english texts in front-end.What should I do?!
Did you properly put your fa_IR.mo file in the /wp-content/languages folder?
And did you properly set define( 'WPLANG', 'fa_IR' ); in wp-config.php?
https://codex.wordpress.org/WordPress_in_Your_Language

Trouble Translating a WordPress theme

I've created an Arabic website and I am using the zippy theme from MageeWP the things is that I am trying to translate some strings in the theme, but I don't seem to get it working well.
In the theme functions file, there is a specification for the folder location for .PO and .MO files
I created a file ar.mo and put it there, but it still not working, can anybody guide to a clue?
I checked in wp_config.php and indeed the WPLAND is set to ar
I also used the CodeStyling plugin to make the translation, and it didn't work, although the plugin does not problem a .po or .mo files for ONLY ar.
Additionally
the source code of the zippy theme is here: http://themes.svn.wordpress.org/zippy/1.0.9/
Looks like the theme is doing it wrong (simplified code):
define( 'ZIPPY_THEME_BASE_URL', get_template_directory_uri() );
$lang = ZIPPY_THEME_BASE_URL. '/lang';
load_theme_textdomain( 'zippy', $lang );
It's passing an URL and it should be a path, change the load_theme_textdomain line to:
load_theme_textdomain( 'zippy', get_template_directory() . '/lang');
I had a look at the Zippy theme. There are a template called en_US.po inside the lang folder. I had a look at that as well.
If you don't have poedit installed, download poedit now and install it on your computer. Now, make a copy of en_US.po and rename it ar.po. Open ar.po with poedit. Now you can do all your translations in this template. When you're done, just click save in poedit. Poedit will automatically create a ar.mo template when your ar.po is saved.
Note, this is just a quick way of doing it, as there are already a language file available that isn't yet translated.
Hope this helps

Cannot Edit Files on Wordpress theme

Hello I'm using wordpress theme livewire version 2.0, when I use the editor in theme update the edited file, for example footer.php I changed the text and add some. It is saved when I view the profile but when i look the template and look at the footer it never changed even if I delete the lines in footer.php nothing changed. Why is this happening? Thanks in advance
You should find out which file was included exactly as a footer. So if you should find the relevant template files such as index.php to see if it include footer.php as footer or any other files or just hard coded there

Resources