Client-side gettext function