|
|||
|
So, let's say you've built a huge website, in which you've defined an enormous amount of translation identifiers (like contact_frm_desc, which should, for example, translate to Contact Form and Contactformulier and so on). However, you were so busy coding and drinking coffee, that you forgot to put every identifier in at least one language file. Now, you have a language file with tons of identifiers, but you've probably missed 40 or 50 of them... The big question: does Zend_Translate have a built-in functionality of enabling some sort of logging, so that it keeps track of all identifiers that do not have a translation yet?
I think it would really help to save a lot of time - missing out on these things is pretty easy, I guess. |
|
|||
|
When you're finished drinking coffee, beer and watching football you should read the manual.
See isTranslated(). Or use a program which parses your code like poEdit.
__________________
Greetings Thomas Weidner I18N Team Leader, Zend Framework http://www.thomasweidner.com |
|
|||
|
I know isTranslated exists... but that would mean you'd have to add an isTranslated-check to _every_ call of the translate function, which might become a little tedious. It's great that Zend does not cry out in despair when no translation is available, but it would be nice to at least be able to get some kind of notification if that happens. Or, as you said, having a program that looks through your PHP code for all language identifiers, and giving you an overview of all undefined strings.
And don't think I haven't read the manual. I have. |
|
|||
|
So when you know the method exists, where is the problem at all.
Do simple OOP and add the code you are in need of. There are several people out there who shows how you can do your own helpers.
__________________
Greetings Thomas Weidner I18N Team Leader, Zend Framework http://www.thomasweidner.com |
|
|||
|
I KNOW how to make my own helpers, but that was not what I was ASKING. My _question_ was, whether Translate had a built-in functionality of logging encounters of untranslated strings. If something like it already existed, my making a custom helper would be superfluous. And Yes, I could have checked the Translate source code for something like it, but I've previously found that trying to find _whether_ something exists in Zend is not an easy task.
A simple 'No, the functionality does not exist, but you could try adding it yourself with a custom helper' would have sufficed. But well, thanks anyway. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|