globalizejs / globalize

A JavaScript library for internationalization and localization that leverages the official Unicode CLDR JSON data
https://globalizejs.com
MIT License
4.8k stars 605 forks source link

loadTranslations and Globalize.translate reverted to loadMessages and formatMessage in alpha14 #377

Closed deankarn closed 9 years ago

deankarn commented 9 years ago

I recently updated to the latest globalize 1.0.0-alpha.14 and noticed that Globalize.loadTranslations() and Globalize.translate() are no longer present and have been changed in the documentation as well.

It seem that it somehow has been reverted to the old Globalize.loadMessages() and Globalize.formatMessage() which I have verified as working.

was this by accident or are the loadMessages and formatMessage replacing the loadTranslations and translate?

I much prefer loadTranslations and translate as it is much clearer on their function.

rxaviers commented 9 years ago

Hi @joeybloggs,

We now support MessageFormat (as in ICU), which is a richer solution compared to what we had. So, the rename was to make it evident. Examples can be seen here (note it's compatible with the former simple messages previously called translations).

Thank you for your observation and feel free to add more comments in any question.

deankarn commented 9 years ago

Thanks you for the quick response. I shall update my application.