LocalizationEntryParserUtils
Utility to build a localization table from json, intended to be used with rojo. Can also handle Rojo json objects turned into tables!
Functions
getAvailableLocales
Returns the set of locales available in a folder, inferred from the names of its
StringValue/ModuleScript descendants (e.g. an en.json StringValue -> "en").
decodeLocaleFromInstance
LocalizationEntryParserUtils.decodeLocaleFromInstance(tableName: string,sourceLocaleId: string,localeId: string,--
the locale to decode
lookupTable: {[string]: LocalizationEntry}--
accumulated across locales
) → {LocalizationEntry}--
entries that now have a value for localeId
Decodes only the descendants matching a single locale into the given lookup table, so a locale's JSON is not decoded until it is actually needed. The lookup table is shared across calls, so decoding a non-source locale after the source locale merges its values onto the existing entries (preserving their Source/Context).