Archive for April, 2008

Mr Kirkland

CodeIgniter Language File Translator

Bookmark and Share

My good friend Owen Christian and myself have cooked up a nice little code igniter language file translator. This is a controller and series of views that you can drop in on your CI install and then use a nice front end to manage administration of the language files for your application.

This is meant for people to be able to edit the standard application language files in your CI install, which work with the CI Language Class. The basic idea is that you have a master language, and then this allows translators to translate into other languages.

Features

  • UTF8 support
  • Handles php in language strings
  • Synchronises language keys with ‘master’ language
  • Checks php for syntax errors

Download

Download version 0.5.1 here

Installation

  1. Unpack archive

    tar -zxvf translator-0.5.tgz
  2. Copy files into appropriate location in your CI install (or just unpack archive over your install)
  3. If your language files are in an exotic location, edit config/translator.php
  4. set language files to be writable by your webserver
  5. that’s it!

Usage

  1. (If you haven’t already) Create your master language files and keys e.g.:
    language/english/file1_lang.php

    $lang['file1_some_key'] = ’some key’;
    $lang['file2_another_key'] = ‘another key’;

    etc.
  2. Create corresponding ’slave’ language files e.g.:
    language/japanese/file1_lang.php

    NB You don’t have to create the keys, just the empty writable files
  3. Make sure language files are webserver writable
  4. Fire up your new controller i.e. index.php/translator and go!

Screen Shots

translator top
Translator - choose file to translate
translate file


About

You are currently browsing the Mr Kirkland 2.0 weblog archives for the month April, 2008.

Longer entries are truncated. Click the headline of an entry to read it in its entirety.

Timezone

  • JST: 2008-05-13 21:20
  • BST: 2008-05-13 13:20
  • PDT: 2008-05-13 05:20