JSON Local Texts

    To register all local text keys and translations from JSON files in a folder , call JsonLocalTextRegistration.AddFromFilesInFolder with the path:

    File names in the folder must follow a convention:

    where {LanguageID} is two or four letter language code. Use invariant as language code for invariant language.

    Some sample file names are:

    • site.texts.en-US.json
    • user.texts.invariant.json
    1. MyCoolTexts.es.json
    2. site.texts.en-US.json

    CommonInitialization.Run and CommonInitialization.InitializeLocalTexts calls this method for three predetermined locations under your web site:

    1. ~/Scripts/serenity/texts (serenity translations)
    2. ~/Scripts/site/texts (your application specific translations)
    3. ~/App_Data/texts (user translations made through translation interface)

    Third one contains user translated texts. It is recommended to transfer texts from these files to application translation files under before publishing.