PHP Classes
Icontem

Class: Internationalization and Localization


  Search   All class groups All class groups   Latest entries Latest entries   Top 10 charts Top 10 charts   Newsletter Newsletter   Blog Blog   Forums Forums   Help FAQ Help FAQ  
  Login   Register  
Recommend this page to a friend! ReTweet ReTweet Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Mariano Iglesias  >  Internationalization and Localization  >  Download  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: Internationalization and Localization Support forum
Base name: i18n
Description: Get internationalized texts from databases or XML
Related top rated classes: , ,
Version: -
Required PHP version: -
License: GNU Lesser General Public License (LGPL)
All time users: 1778 users
All time rank: 1524
Week users: 5 users
Week rank: 1487
 
  Author   Group folder image Groups   Detailed description  
  Rate classes User ratings   Applications   Related links   Files Files  

Author

Picture of Mariano Iglesias
Name: Mariano Iglesias <e-mail contact>
Published packages: 1 Browse this author's classes Browse this author's classes
Country: Argentina Argentina - PHP jobs in Argentina
Home page: http://www.marianoiglesias.com.ar/
Age: 31
All time rank: 1063
Week rank: 1150

Innovation Award

PHP Programming Innovation award nominee
July 2005
Number 5
To adapt an application that can be used by users of different countries it is necessary to present the application messages in the idioms spoken in those countries.

Usually the solution is to load configuration files that contain the texts for each of the supported idioms.

However, sometimes it is more convenient to store the translated texts in a database because it is easier to edit and make any changes immediately available to the applications.

This class provides a generalized solution that provides the same interface to retrieve application localized texts independently from how the texts are stored.

Manuel Lemos

Groups

Group folder image XML XML parsing and generation View top rated classes
Group folder image Localization Internationalization and translations View top rated classes
Group folder image Databases Database management, accessing and searching View top rated classes

Detailed description

This package can retrieve texts for internationalized applications from databases or plain text files (XML or INIs).

It provides a base data source class that defines an interface with functions to retrieve texts given their element identifiers, the language to use, the locale for a language (optional), the application section and an eventual container object of a class that is used to retrive the actual internationalized texts.

The base class interface also provides a function to retrieve the list of supported languages, and locales.

The package comes with implementation classes that know how to access the data source container objects to retrieve the texts, supported languages and locales.

Currently there are implementation classes that can retrieve the information from either databases or plain text files (in the form of XML or INI files.) Other implementation classes can be developed to retrieve the information from other data sources, such as LDAP repositories.

User ratings

There are not enough user ratings to display for this class.

Applications that use this class

No application links were specified for this class.
Add link image If you know an application of this package, send a message to the author to add a link here.

Related links

Link Description
Codes for the representation of names of languages (Library of Congress) ISO 639-1 is the alpha-2 code, used within the I18N package to identify languages by using a two letter code.
Official ISO list of countries and the corresponding ISO 3166-1 alpha-2 code elements List of two letter country codes used within the I18N package for identifying locales within a language.

Files

File Role Description
Plain text file database.php Example An example script that uses a database connection as a string source.
Plain text file DatabaseConnection.class.php Class Class that extends and implements methods in DatabaseConnectionManager and is used by the database.php example script.
Plain text file DatabaseConnectionManager.class.php Class This is an abstract class that provides the skeleton for the implementation of the class that will provide database connectivity to I18N.
Plain text file DatabaseDataSource.class.php Class Implementation of DataSource, that provides the database based approach to obtain elements.
Plain text file DataSource.class.php Class Abstract class that all data sources should implement.
Plain text file Documentation.txt Doc. Documentation that tells how to install this script, and provides a description of how to use this package.
Plain text file Dommer.class.php Class The XML parser used to parse the configuration file when using text source. It will use the DOM XML package (it is PHP5 compatible), or if it is not available, it will use PEAR's XML_Parser.
Plain text file example-data.sql Data SQL script to insert some example data in the database.
Plain text file file.php Example This class presents an example of using the I18N package with text files as its source of data.
Plain text file FileDataSource.class.php Class Implementation of DataSource, that provides the file based approach to obtain elements.
Plain text file i18n-xml.xml Data The XML configuration file used by the xml.php example script. You need to adjust paths to use it.
Plain text file I18N.class.php Class The main I18N class that handles internationalization and localization.
Plain text file i18n.sql Data SQL script to create tables for using a database as a source for the I18N package.
Plain text file i18n.xml Data The XML configuration file used by the file.php example script. You need to adjust paths to use it.
Plain text file language.en.lang Data Example language file for the file.php example script.
Plain text file language.en.lang.xml Data Example language file for the xml.php example script
Plain text file language.en_uk.lang Data Example language file (localized) for the file.php example script.
Plain text file language.en_uk.lang.xml Data Example language file (localized) for the xml.php example script
Plain text file language.es.lang Data Example language file for the file.php example script.
Plain text file language.es.lang.xml Data Example language file for the xml.php example script
Plain text file xml.php Example This script presents an example of using the I18N package with XML files as its source of data
Plain text file XmlDataSource.class.php Class Implementation of DataSource, that provides the XML file based approach to obtain elements.
Download all files: i18n.tar.gz i18n.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.

 
  Advertise on this site Advertise on this site   Site map Site map   Statistics Statistics   Site tips Site tips   Privacy policy Privacy policy   Contact Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2009 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products