Question

I've been reading some of the questions and answers regarding locales and some of the suggest the use of the Zend Locale library.

Would it be possible to use this library in CodeIgniter or does it depend on other components? I'd like to be able to convert values, currencies and dates if possible without letting go of CI language files.

What do you think? Would it be looking for trouble and hacks to get it working?

Was it helpful?

Solution

Zend Framework components are supposed to be usable separately, but some of them depend on other ZF components as well. So, maybe you'll need to provide some others together with Zend_Locale.

You can have a look at the files in Zend/Locale and Zend/Locale.php and grep for require_once statements. After a quick look at Zend/Locale.php it seems that you'll probably need Zend_Registry and Zend_Cache at least.

To make Zend's components work and "auto-require" the files they need, you just have to make sure their root folder 'Zend' is in you include path.

Hope that helps...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top