Fix EZP-23317: ez_trans_prop example not working like documented

Unit test was missing for this fucntion, and adding one uncovered some issues:
- Need to pick method first as VersionInfo->names exists, but getName contains logic for fallback language so should be prefered
- When dealing with propery we need to (of course) read it to variable as array lookup on magic properties does not work

Thanks to QA for finding this.