How do language files work within PremiumPress themes?
All of the PremiumPress themes come with a single language file which contains all of the website (front end) text, this file is provided in english with the filename: language_english.php.
The idea of this setup is to allow you to customize and create your own language files for your theme by simply changing the wordpress in one file rather than searching through all of the files for the text you want.
Creating your own language file
It is recommended to create a new language file if you are going to edit your website text. Todo this simply duplicate the existing language file (language_english.php) and rename it to your own with this syntax:
language_yourname.php
So for example, if i was going to create a french language file, i would copy the english one, rename it to language_french.php and save it.
Editing the language file
The language files are simply a big array of text values, they look like this;
"_home" => "Home", "_username" => "username", "_password" => "password",
All you do is simple change the text value in the second column so your might look like this;
"_home" => "Home Page Edit", "_username" => "My Username Edit", "_password" =>" My Password Edit",
Activating your new language file
Once you have renamed and created your new language file you need to upload it into your theme folder;
/wp-content/themes/**/template_**/
** = is the theme name your using so for example directorypress would be;
/wp-content/themes/directorypress/template_directorypress/language_yourname.php
If you have uploaded it correctly, when you login to the admin area under General Setup -> languages you should be able to see your language in the drop down menu.
Mark,
So far I am loving these classified theme. You don’t have an idea of how hard is been for me
finding the most complete theme and in spanish! Thank you very much.
Success Always!
Hi, what about translating the backend? Is there a way to do so?
suffice to go to cpanel, and there rename the file eg
language_espanish
or I have to copy the file and add this last to have the two
I’ve downloaded using filezilla, and changing the original file name and uploading to the server again, and leave the two on the wordpress, this mean that what you write will be in Spanish if I just renamed a file
I just changed the language file and uploaded it using filezilla. However, instead of showing another language, the website doesn’t show anything at all anymore? what have I done wrong??