Zend Locale 库可以与 CodeIgniter 一起使用吗?
我一直在阅读一些有关区域设置的问题和答案,其中一些建议使用 Zend Locale 库。
是否可以在 CodeIgniter 中使用该库,或者它是否依赖于其他组件?如果可能的话,我希望能够在不放弃 CI 语言文件的情况下转换值、货币和日期。
你怎么认为?它会寻找麻烦和黑客来让它工作吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Zend Framework 组件应该可以单独使用,但其中一些组件也依赖于其他 ZF 组件。因此,也许您需要与
Zend_Locale
一起提供其他一些内容。您可以查看
Zend/Locale
和Zend/Locale.php
中的文件以及 grep forrequire_once
语句。快速浏览一下Zend/Locale.php
后,您似乎至少需要Zend_Registry
和Zend_Cache
。为了使 Zend 的组件工作并“自动需要”它们需要的文件,您只需确保它们的根文件夹“Zend”位于您的包含路径中。
希望有帮助...
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
andZend/Locale.php
and grep forrequire_once
statements. After a quick look atZend/Locale.php
it seems that you'll probably needZend_Registry
andZend_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...