I needed to use a class from ZF2 in my Yii project.
I've read probably all there is about this subject and still I needed lots of trial & errors to get it working, probably due to my lack of experience working with namepsaces and ZF2 in general. Also, the resources on the web are all partial, at best. Most simply refer to ZF1 where things are technically different. When I got it all working I decided to record my findings and that's how this article was born. The below recipe is what worked for me, accompanied by relevant comments.
References: This article is partially based on this guide page. Be sure also to consult Zend Framework 2 documentation.
Sometimes you want to use exisiting translations for locales, which do not directly match.
An example would be a website targeting Germany (de_de), Austria (de_at) and Switzerland (de_ch, fr_ch, it_ch). Although you may have
exisiting translations for German (de), French (fr) and Italian (it), there are problems using it directly.