In this example, translations is a global object that contains all the translations from the “it.json” file. The sections property contains translations for custom sections, and the my_section property contains translations for the specific custom section.
You can use my_section_translations.header and my_section_translations.description to retrieve the translated header and description for the section, respectively.
Please also make sure that you should add the same section name which is being used in the “it.json” file to access the translated text.
Please be aware that any custom section file that you want to translate should be in your theme’s sections directory, and the files should be using the .liquid extension.
Also, after you’ve made these changes and added the translations to the “it.json” file, you should be able to switch the language of your store and see the translations displayed on your website.