localized-strings icon indicating copy to clipboard operation
localized-strings copied to clipboard

More compact object structure

Open almostintuitive opened this issue 6 years ago • 0 comments

Hi!

We're using react-native-localization in our quite larger react-native app, and bumped into an issue where our localization file actually takes up 15-20% of our bundle. In this situation, a different structure, where the keys are not repeated (but the languageIsos) would result in a substantially smaller filesize for us.

It'd look like this:

export const Localized = new LocalizedStrings({
 learnMore: {
   en: 'Learn more',
   de: 'erfahren Sie mehr',
 }
})

Have this been considered?

almostintuitive avatar Aug 19 '18 16:08 almostintuitive