2008年8月25日星期一

[fw-mvc] Re: [fw-i18n] Changes in Zend_Translate?

On Mon, Aug 25, 2008 at 12:55 PM, Thomas Weidner <thomas.weidner@gmx.at> wrote:
Hy Adam,

there are only 2 exceptions when you try to switch to another language:

*) The locale/language you want to switch to in not a locale... for example "qq_QQ"...
*) The language you want to switch to has nothing to translate and also the fallback does not exist.

Second was added because users mocked about the problem that they get no message when their translation files are empty. They want to know when there is nothing to translate.

So when you switch your language to "en_GB" and have no translations it will be checked if "en" has translations. Only if both have no translations there will be an exception.

Of course when you only add ONE language "en_GB" and there are no translations this exception will also raise.
This is why there is a automatic source detection and a directory scanning. But as you don't use it, you will have to do the fallback or rerouting yourself.

Thanks for letting me know; I'll look into the automatic source detection again.  IIRC, I had difficulty setting it up several months back and just decided to choose the file myself...but that's my own fault :)  In any case, if I don't end up using the automatic detection, I'll see about handling the rerouting myself per your suggestion.
 


Btw: Line 311 in trunk is a comment since about 20 days.

My original post this morning was based on revision 11044, and I just downloaded 11061...in both cases, line 311 of Zend_Translate_Adapter is alive and uncommented.  The relevant line from my svn:externals file is "Zend -r11044 http://framework.zend.com/svn/framework/standard/trunk/library/Zend" ...am I using the correct trunk?
 
In any case, I appreciate your feedback; I was very frustrated when I posted this morning, so I apologize if I came off too critical.

Thanks!
Adam

没有评论: