Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-26-2008, 08:52 AM
Junior Member
 
Join Date: Aug 2008
Posts: 8
Default Zend Translate - log missing translations

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 09-26-2008, 09:31 AM
Member
 
Join Date: Aug 2008
Posts: 55
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 09-26-2008, 09:42 AM
Junior Member
 
Join Date: Aug 2008
Posts: 8
Default

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 09-26-2008, 10:32 AM
Member
 
Join Date: Aug 2008
Posts: 55
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 09-26-2008, 11:05 AM
Junior Member
 
Join Date: Aug 2008
Posts: 8
Default

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 09-26-2008, 12:58 PM
wrs's Avatar
wrs wrs is offline
Member
 
Join Date: Sep 2008
Posts: 42
Default

No, the functionality does not exist and im glad it doesnt.

You could try adding it yourself with a custom helper.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old Yesterday, 09:04 PM
Junior Member
 
Join Date: Nov 2008
Posts: 1
Default

Quote:
Originally Posted by Nastareger View Post
you could try adding it yourself with a custom helper'
Hi,
could you share your code if you finally did it?
I am new to ZF and it would save me a lot of effort.

Thanks.
SW
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 08:58 PM.