diff options
Diffstat (limited to 'web/react/utils/client.jsx')
-rw-r--r-- | web/react/utils/client.jsx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx index d60fea872..65353b70d 100644 --- a/web/react/utils/client.jsx +++ b/web/react/utils/client.jsx @@ -60,6 +60,18 @@ function handleError(methodName, xhr, status, err) { return e; } +export function getTranslations(locale, success, error) { + $.ajax({ + url: '/static/i18n/' + locale + '.json', + dataType: 'json', + success, + error: function onError(xhr, status, err) { + var e = handleError('getTranslations', xhr, status, err); + error(e); + } + }); +} + export function createTeamFromSignup(teamSignup, success, error) { $.ajax({ url: '/api/v1/teams/create_from_signup', |