[ANNOUNCEMENT] Translation2-2.0.0beta3 (beta) Released.
| From: | PEAR Announce | Date: | Thu, 11 Nov 2004 17:33:32 +0000 |
| Subject: | [ANNOUNCEMENT] Translation2-2.0.0beta3 (beta) Released. | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-15449@lists.php.net to get a copy of this message | ||
The new PEAR package Translation2-2.0.0beta3 (beta) has been released at http://pear.php.net/.
Release notes
-------------
- Welcome to the new developers, Ian Eure and Michael Wallner
- The last release contained an old gettext driver (bug #2503) (ieure)
- Many portability fixes applied to the database containers (thanks to Ian Eure and
Xavier Lembo for their suggestions and patches)
- Minor changes to the table definitions for better portability (lowercase field names,
VARCHAR instead of CHAR, bigger field size)
- setLang() now returns an error if called with an unknown $langID (bug #2498).
- Added $cleaningFrequency option to the CacheLiteFunction to implement
statistic cache cleaning
- Added Translation2_Admin::cleanCache() method to clean the cache on demand.
It is automatically triggered after a change if $options['autoCleanCache'] is TRUE.
- Big cleanup of the DB and Admin_DB containers. See CVS changelog for details.
(ieure)
- Added update() method to Translation2_Admin. This is a BC break; you used to be able
to update strings with add(). This is no longer possible, use update(). (ieure)
- Re-added a check in add() to see if an update() is needed instead of an insert
- String ID columns are created as type TEXT to support gettext-style string IDs.
(ieure)
- Reflect the changes made to the DB container into the MDB and MDB2 containers too,
plus other minor fixes/optimizations.
- strings_default_table may use %s to represent the language name. You may now have one
table per language without having to explicitly specify them all. (ieure)
- DefaultText decorator has new getStringID() method, which will return the string which
was requested if no stringID exists. This mirrors the gettext() semantics. (ieure)
- Added Admin_Decorator class, which allows you to create Decorators for
Translation2_Admin. (ieure)
- New 'Autoadd' Admin Decorator, which automatically adds requested strings. (ieure)
- Removed translate(), added getStringID(). You can mimic the old behaviour in
two steps:
$stringID = $tr->getStringID('mystring', 'mypage');
$translatedString = $tr->get($stringID, 'mypage', $otherLangID);
- Major cleanup of the gettext container and added some examples (mike)
- removeLang() was missing. Fixed.
- The gettext container no longer require the gettext extension (thanks to Sergey Korotkov);
it is used when loaded, though, since it's faster.
- Both .mo and .po files are valid data sources for the gettext container (Sergey Korotkov)
- New Iconv decorator based on the one written by Sergey Korotkov
- Added a new "encoding" column to the langsAvail table
- New xml container by Olivier Guilyardi
Package Info
-------------
This class provides an easy way to retrieve all the strings for a multilingual
site from a data source (i.e. db).
The following containers are provided, more will follow:
- PEAR::DB
- PEAR::MDB
- PEAR::MDB2
- gettext
- XML
- PEAR::DB_DataObject (experimental)
It is designed to reduce the number of queries to the db, caching the results when possible.
An Admin class is provided to easily manage translations (add/remove a language, add/remove a
string).
Currently, the following decorators are provided:
- CacheLiteFunction (for file-based caching)
- CacheMemory (for memory-based caching)
- DefaultText (to replace empty strings with their keys)
- Iconv (to switch from/to different encodings)
- Lang (resort to fallback languages for empty strings)
- SpecialChars (replace html entities with their hex codes)
- UTF-8 (to convert UTF-8 strings to ISO-8859-1)
Related Links
-------------
Package home: http://pear.php.net/package/Translation2
Changelog: http://pear.php.net/package/Translation2/download/2.0.0beta3
Download: http://pear.php.net/get/Translation2-2.0.0beta3.tgz
Authors
-------------
Lorenzo Alberton <l.alberton@quipo.it> (lead)
Ian Eure (developer)
Michael Wallner <mike@php.net> (developer)