Adding New Languages to Elgg

So, you are starting your own Elgg site, and you wanna set up your own language but you don’t know where to start. Well, here is a little guide posted by an Elgg Core Developers, that I think you will find very helpful, when changing the language from English to any language you want.

If you don’t have Dreamweaver or another web programming app, please use Notepad++. It is open source, easy to use and perfect for editing php/html files.

Some Basics

Elgg deals in language files. Go to your root folder and you will find a languages folder. Open that and you’ll find a ‘en.php’. Open that (DW or Notepad++) and you’ll see the layout of a language file.

To alter the language all you need to do is change the following:

$english = array(

add_translation(“en”,$english);

to

$espanol = array(

add_translation(“bn”,$espanol);

Then simply edit the following text:

‘login’ => “Log in”,

‘loginok’ => “You have been logged in.”,

to

‘login’ => “Ingrese”,

‘loginok’ => “Usted ha ingresado exitosamente”,

Remember to save as otherwise you will overwrite your en.php file.

Further

Every plugin (usually) has its own language file. You can find this out by going into the root folder of that plugin and seeing if there is a language folder. Open it up and check what you’ve got inside. Do the same operation as mentioned above in basics.

Saving - Important

When you save a language file that’s not en.php it must be encoded properly. (Notepad can’t manage this easily). It must be encoded as UTF_8(w/o BOM). If you don’t do this then you’ll get a lot of question marks where you language should be.

Thanks to Trajan

For more info about Elgg hosting solutions please visit Arvixe-Elgg Hosting

Tags: , , , , , , , | Posted under EggBlog, Elgg | RSS 2.0

Author Spotlight

Rodolfo Hernandez

Rodolfo Hernandez

I like photography and reading books. Currently working for Arvixe as Elgg Community Liaison. Elgg Security Expert Web Security Expert CEO of UDP SW Social Web

Leave a Reply

Your email address will not be published. Required fields are marked *


− 3 = 1

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>