Linux SoftwareProgrammingInternationalizationFLP-i18n 2.1b2

FLP-i18n 2.1b2


i18n is a collection of PHP classes for managing multilanguage webpages
Developer:   flaimo
      more software by author →
Price:  0.00
License:   Free for non-commercial use
File size:   0K
Language:   
OS:   
Rating:   0 /5 (0 votes)
Your vote:  
enlarge screenshot


i18n is a collection of PHP classes for managing multilanguage webpages. Translation strings can be stored in flat text files, precompiled gettext files or a mysql database.

The i18n package is a punch of classes for internationalization. It gives you the possibility to maintain multilanguage webpages more easily. The translation strings are stored in flat text files, special Gettext files which are basically precompiled translation files or in a MySQL database. And it works independently from PHP’s setlocale function.

First, to avoid problems, make sure that for all pages that use the package you start and end your scripts with:

ob_start();
session_start();

and

ob_end_flush();

Getting the language:

Let’s start with one of the base classes, the language class. It’s propose is to determinate the preferred locale of the user, by looking at the HTTP_ACCEPT_LANGUAGE header an the users IP address.

First create a new object:

include('class.Language.inc.php');
$lg = new Language();

Let’s say the user has set his browser to “German – Austria” (de-at). Now get your information with those methods:

$lg->getLocale() outputs de_at (the hyphen is replaced with an underscore)
$lg->getLang() outputs de
$lg->getCountry() outputs at

Of course some users have set more than one locale. To get those informations use:

$lg->getUserRawArray() to get an array with all locales accepted by the user
$lg->getUserLangArray() for all Languages
$lg->getUserCountryArray() for all countries

But what if the user has set no specific country code or no locale information could be found at all? That’s where the default values kick in. Stuff like this is saved in the i18n_settings.ini file:

[Language]
default_locale = "en"
default_language = "en"
default_country = "us"

To retrieve those settings in your script use

$lg->getDefaultLocale()
$lg->getDefaultLanguage()
$lg->getDefaultCountry()

But there are much more settings for the package you can change in the i18n_settings.ini file:

* The method for getting the translations (normal text files, Gettext files, MySQL),
* The extensions for the translation files
* The database connection settings
* If translation errors should be shown or not

You can also force a specific locale to overrule all other locale sources when you create a language object:

$lg_gb = new Language('en_gb');
tags the user  gettext files  for all  text files  the i18n  user has  new language  you can  language let’s  for the  has set  settings ini  the language  

Download FLP-i18n 2.1b2


 http://prdownloads.sourceforge.net/php-flp/i18n_v21b2.zip?use_mirror=unc
 http://prdownloads.sourceforge.net/php-flp/i18n_v21b2.zip?use_mirror=voxel
 http://prdownloads.sourceforge.net/php-flp/i18n_v21b2.zip?use_mirror=puzzle


Authors software

FLP-i18n 2.1b2 (by flaimo)
i18n is a collection of PHP classes for managing multilanguage webpages


Similar software

FLP-i18n 2.1b2 (by flaimo)
i18n is a collection of PHP classes for managing multilanguage webpages

libintl-perl 1.16 (by Guido Flohr)
libintl-perl is a library that supports message translation for Perl, written in pure Perl (version 5.004 or better)

Locale files for South Africa 0.3 (by Dwayne Bailey)
Locale files for South Africa are scripts to aid in localization of software

Gettext Commons 0.9 (by XNap Commons Team)
Gettext Commons project provides Java classes for internationalization (i18n) through GNU gettext.

The lightweight Gettext Commons

Locale Switcher 2.0 for Firefox (by Benjamin Smedberg)
Locale Switcher extension provides simple way to switch between languages through a menu.

The default UI for Firefox does not prov

Locale file highlighter for Vim (by Dwayne Bailey)
Glibc uses locale (or fdcc) files to define cultural conventions

Locale::KeyedText 1.73.0 (by Darren R. Duncan)
Locale::KeyedText is a Perl module that refers to user messages in programs by keys.

It also describes the same-number versions of

MuPO 0.46 (by Jens Wilhelm Wulf)
MuPO is a multi-purpose organizer.

Here are some key features of "MuPO":
· Hierarchical todo-list and notes, appointments, calend

po4a 0.23 (by Jordi Vilalta)
po4a comes for po for anything and it's goal is to ease translations (and more interestingly, the maintenance of translations) using

Template::Tutorial 2.15 (by Andy Wardley)
Template::Tutorial are template toolkit tutorials.

This section includes tutorials on using the Template Toolkit


Other software in this category

MozillaTranslator 5.13 (by Henrik Lynggaard)
MozillaTranslator (the program) is for localizator//translators that want to localize Mozilla or another XUL based application.

Wh

Hunky Fonts 0.3 (by Ariszlo)

rxvt-unicode 8.1 (by Marc A. Lehmann)
rxvt-unicode is a clone of the well known terminal emulator rxvt, modified to store text in Unicode (either UCS-2 or UCS-4) and to us

StarDict 2.4.8 (by Hu Zheng)

gucharmap 1.7.0 (by Noah)
gucharmap is a Unicode Character Map and Font Viewer

    search


Featured Software

jEdit 4.3 pre8
jEdit is an Open Source text editor written in Java

Opera 9.02
Surf the Internet in a safer, faster, and easier way with Opera browser

GNU Aspell 0.60.4
GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell


Subscribe in Rojo
Google Reader
Add to My Yahoo!

Add to My AOL
Subscribe with Bloglines
Subscribe in NewsGator Online
Add 'nixbit linux software' to Newsburst from CNET News.com
del.icio.us nixbit linux software


Top tags