Split up logic in sphinx.transforms.i18n.Locale.apply
#11166
Merged
sphinx.transforms.i18n.Locale.apply
#11166