From 9508b0a514a7725da36ab2b9a9b98ba9072bd9b4 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Fri, 10 Jun 2022 18:48:09 +0200 Subject: [PATCH] Lowercase locale value to fetch the proper translation file --- packages/react-native-editor/src/setup-locale.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react-native-editor/src/setup-locale.js b/packages/react-native-editor/src/setup-locale.js index c4b222b54f8518..bb50c5e76d3fb9 100644 --- a/packages/react-native-editor/src/setup-locale.js +++ b/packages/react-native-editor/src/setup-locale.js @@ -22,6 +22,8 @@ export default ( pluginTranslations = [] ) => { const setDomainLocaleData = ( { getTranslation, domain = 'default' } ) => { + // Lowercase the locale value as translation filenames are also lowercased. + locale = locale?.toLowerCase(); let translations = getTranslation( locale ); if ( locale && ! translations ) { // Try stripping out the regional