Language Files


Updated on Monday, April 11th, 2011


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.

 

Admin Area Translations

The admin area cannot be translated at this time.


  1. comment says:
    Posted May 1, 2011 at 11:58 pm | Permalink

    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!

  2. comment says:
    Posted June 8, 2011 at 9:48 pm | Permalink

    Hi, what about translating the backend? Is there a way to do so?

  3. comment says:
    Posted November 4, 2011 at 10:42 am | Permalink

    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

  4. comment says:
    Posted November 4, 2011 at 11:32 am | Permalink

    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

  5. comment says:
    Posted February 7, 2012 at 5:49 pm | Permalink

    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??

  6. comment says:
    Posted January 1, 2013 at 6:54 pm | Permalink

    Same here, having problems.

50% discount

Can't decide which theme is right for you?

Purchase the VIP collection pack today and download all our themes + free access to all future themes we develop at no extra charge!

Save over $250 today! Was $599 now only $249 for them all.


Click here to download them all now!