In a clean install of Sitecore 8.1 update-3, the templates and their related sections/fields are always created in English, no matter what language the user may be working in from the ribbon:
But if your user/developer has changed their language preference in their profile (Control Panel > Region and language options > Display language
) then the template is created if their preference language.
Short Answer
The simplest solution is to ensure that the language preference for all your developers/users is English when working with templates.
Long Answer
The issue is in the Sitecore Template Builder code itself. If you feel this is a bug then you should report it to Sitecore and ask for a fix.
My investigation leads me to believe that the issue is in
\sitecore\shell\Applications\Templates\TemplateBuilder\TemplateBuilder.xml
and it's related CodeBeside
located in Sitecore.Shell.Applications.Templates.TemplateBuilder.TemplateBuilderForm
in Sitecore.Client.dll
An initial check is made that the user has the correct write permissions to create/edit templates in the language selected from the ribbon, but the sections and fields are created without passing this selected language into account. Instead, all calls are made without any language parameter being passed so it uses Sitecore.Context.Language
, i.e. the user preference language stored in their profile.
There is no easy way of overriding the methods you need; Save()
, SaveTemplate()
, SaveSection()
and SaveField()
are all either non-virtual or private static. Wrapping HandleMessage()
in LanguageSwitcher("en")
also does not work since the call is initiated with Context.ClientPage.Start()
and the language reverts back to the user preference.
You could fix it but not cleanly, it means overriding a lot of code which increases the possiblility of issues if you upgrade and Sitecore changes their own internal implementation.