FLP-i18n 2.1b2
Sponsored Links
FLP-i18n 2.1b2 Ranking & Summary
File size:
0.20 MB
Platform:
Any Platform
License:
Free for non-commercial use
Price:
Downloads:
1661
Date added:
2005-04-18
Publisher:
flaimo
FLP-i18n 2.1b2 description
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 PHPs 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:
Lets start with one of the base classes, the language class. Its 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();
Lets 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? Thats 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);
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 PHPs 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:
Lets start with one of the base classes, the language class. Its 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();
Lets 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? Thats 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);
FLP-i18n 2.1b2 Screenshot
FLP-i18n 2.1b2 Keywords
FLP
PHP
Php Classes
files
language
classes
locale
s
translation
FLP-i18n
FLPi18n
FLP-i18n 2.1b2
Internationalization
Programming
Bookmark FLP-i18n 2.1b2
FLP-i18n 2.1b2 Copyright
WareSeeker periodically updates pricing and software information of FLP-i18n 2.1b2 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of FLP-i18n 2.1b2 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
language translation
filesharing
wav files
files with this
file share
files without having
midi files
language of flowers
files theme rockford
.rar files
online php classes
files and settings transfer
rar files
hardest language to learn
fileshack
files from your
language arts lesson plans
php classes tutorial
Related Software
Ariadne is a Web Application Server and Content Management System. Free Download
UML2PHP5 is a Dia plugin to generate PHP code from UML. Free Download
PHP Voice (formerly known as PHP VXML) contain four classes that assist in developing voice application using PHP. Free Download
libintl-perl is a localization library for Perl. Free Download
PassReminder is a free password manager. Free Download
RSS Builder offers PHP classes for generating an RSS feed. Free Download
tclog is a weblog application written in Tcl/Tk. Free Download
LLgen is a LL parser in the style of yacc. Free Download
Latest Software
Popular Software
Favourite Software