From 18f210eef57c5b6254b92f7fffe772e597678067 Mon Sep 17 00:00:00 2001 From: Ildar Kamalov Date: Mon, 26 Nov 2018 10:55:42 +0300 Subject: [PATCH] Pass two-letter language code --- client/src/actions/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/actions/index.js b/client/src/actions/index.js index a4da8c9a..3e5b38bc 100644 --- a/client/src/actions/index.js +++ b/client/src/actions/index.js @@ -500,7 +500,8 @@ export const changeLanguageSuccess = createAction('CHANGE_LANGUAGE_SUCCESS'); export const changeLanguage = lang => async (dispatch) => { dispatch(changeLanguageRequest()); try { - await apiClient.changeLanguage(lang); + const langCode = lang.substring(0, 2); + await apiClient.changeLanguage(langCode); dispatch(changeLanguageSuccess()); } catch (error) { dispatch(addErrorToast({ error }));