<?php $domain = 'myapp'; echo bindtextdomain($domain, '/usr/share/myapp/locale');?>
The above example will output:
/usr/share/myapp/locale