Comunitatea PHP Romania
 

 
Class Summary Translation2_Decorator_Lang

Class Summary Translation2_Decorator_Lang

Class Summary Translation2_Decorator_Lang  -- Decorator to provide a fallback language for empty strings.

Lang Decorator Example

This decorator is very useful when you want to provide a fallback language for empty strings. It is stackable, so you can have more than one default language. Use setOption() with the fallbackLang parameter to specify the fallback language of the current decorator.

$tr = new Translation2($driver, $dbinfo, $params);

//set English as the main language
$tr->setLang('en');

//set Italian as the first fallback language
$tr =& $tr->getDecorator('Lang');
$tr->setOption('fallbackLang', 'it');

//set Spanish as the second fallback language
$tr =& $tr->getDecorator('Lang');
$tr->setOption('fallbackLang', 'es');

Ultimele discutii in forum RSS Forum

Ultimele articole Ultimele articole

Top membri

Pirahna Pirahna
la birou
carco carco
Bucuresti
Birkoff Birkoff
Bucuresti
mihaitha mihaitha
Sibiu
Mascka Mascka
Braila
gabysolomon gabysolomon
Bacau
whooper whooper
Toronto ON
raul_ raul_
dechim dechim
Drobeta Turnu Severin
Amenthes Amenthes

Newsletter


Email:
 inscriere
 renuntare
 
 Arhiva newsletter

Parteneriat

Copyright © 2001-2009 PHP Romania Add PHPRomania to Google Add PHPRomania to Del.icio.us Add PHPRomania to Stumbleupon Add PHPRomania to Yahoo! Add PHPRomania to Digg Add PHPRomania to Blink Loans | Buy Anything On eBay | Bankruptcy | Buy Anything On eBay | Mortgage
Ads: Partener Way2Web Nework: gazduire web | inregistrare domenii | web design | imobiliare | web hosting
Powered by Simplis