messageformat.js adaptation for php