virtuals/i18n/v-files
Variables
Section titled “Variables”availableTranslationFileKeys
Section titled “availableTranslationFileKeys”const availableTranslationFileKeys: any;
Defined in: studiocms/packages/studiocms/src/virtuals/i18n/v-files.ts:49^
An array of translation file keys derived from availableTranslationFiles
.
Each key is generated by removing the .json
extension from the file name.
Falsy values are filtered out from the resulting array.
Example
Section titled “Example”// If availableTranslationFiles = ['en.json', 'fr.json']// availableTranslationFileKeys = ['en', 'fr']
availableTranslations
Section titled “availableTranslations”const availableTranslations: ServerUiTranslations;
Defined in: studiocms/packages/studiocms/src/virtuals/i18n/v-files.ts:104^
Loads and returns the available server-side UI translations, excluding English (‘en’). For each translation file key, reads the corresponding JSON file, checks its string values, and includes it in the results only if it passes the threshold check. Skips translation files with too many empty strings and logs a warning.
Returns
Section titled “Returns”An object mapping language keys to their translation records.