protected MessageSource createExtendedMessageSource(final String basename) {
        if (StringUtils.equalsIgnoreCase(basename, ThemeProperties.DEFAULT_THEME_NAME)) {
            val customTheme = StringUtils.replace(basename, "-default", "-custom");
            val source = (HierarchicalMessageSource) super.createMessageSource(customTheme);
            source.setParentMessageSource(super.createMessageSource(basename));
            return source;
        }
        val source = (HierarchicalMessageSource) super.createMessageSource(basename);
        val defaultSource = super.createMessageSource(ThemeProperties.DEFAULT_THEME_NAME);
        source.setParentMessageSource(defaultSource);
        return source;
    }
This is {@link DefaultCasThemeSource}.

@author Misagh Moayyed
@since 6.6.0
support/cas-server-support-themes-core/src/main/java/org/apereo/cas/services/web/DefaultCasThemeSource.java