It would be great if all the text strings in the views generated by Gii were wrapped in some kind of translation function so I could easily change the common words in my own language without having to edit all the views.
It would be great if all the text strings in the views generated by Gii were wrapped in some kind of translation function so I could easily change the common words in my own language without having to edit all the views.
In fact - I prefer translating views by creating copy of this view in subdirectory of language name than using Yii::t() to translate every literal in views. using multiple files should be faster than calling same function very often in every view…
I don’t mind the few extra miliseconds, what I really like is the ability to have a language-pack that I can just drop in every app I create without having to touch the views. Creating multiple translated versions of the same view could work, but you’ll have to do every modification several times. Further, if you need a lot of translations, you can send the language-file to a translator and you can put the translated copy right back in your app.
If speed was really a problem, you can always use caching.