Kohana I18n __() or maybe I18n::load(). Performance [closed]
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.
精彩评论