Details
-
Type:
Docs: Problem
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.5.0RC1
-
Fix Version/s: 1.5.1
-
Component/s: Zend_Translate
-
Labels:None
-
Language:English
Description
As API Doc says getLocale() should return a Zend_Locale instance. Instead it returns a string like 'de_DE'.
$locale = $translate->getLocale(); Zend_Debug::dump(is_object($locale)); #returns false; Zend_Debug::dump(is_string($locale)); #returns true; $lang = $locale->toString(); #Fatal error: Call to a member function toString() on a non-object
But "de_DE" is the locale.
A Zend_Locale can be
Both are true and valid...
Every class which takes a locale must accepts both ways.
- a object of type Zend_Locale
- a locale definition string from Zend_Locale
Both are true and valid... Every class which takes a locale must accepts both ways.