开发者

Kohana I18n __() or maybe I18n::load(). Performance [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 11 years ago.

If I have medium multilingual page and I have to translate all short sentence on this page (i.e. 'Create account' etc), how much time takes usually tran开发者_如何转开发slation? Is time of translation perceptible for users?

And the second question, has

$array = I18n::load('lang-lang') 

and the using it better performance then just using __()?


__() is a proxy to strtr(), which is a native PHP function, meaning very fast.

With 150 strings you won't notice any performance changes without a benchmark (meaning 0.00x s for translations total).

I don't understand the other part of the question as I18n::load() isn't comparable to __() at all, it just loads the appropriate translations file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜