Exemplo n.º 1
0
        /// <summary>Gets the language gateway manaing translations on the given site.</summary>
        /// <param name="managingTranslationsOnSite">the site whose language gateway to get.</param>
        /// <returns>A language gateway filtering languages.</returns>
        public virtual ILanguageGateway GetLanguageGateway(Site managingTranslationsOnSite)
        {
			var gateway = languages;
            if (Enabled && LanguagesPerSite)
                gateway = new SiteFilteringLanguageGateway(languages, managingTranslationsOnSite, persister, languagesCache, descendantFinder);

			return Cache
				? new CachingLanguageGatewayDecorator(gateway, cacheWrapper, persister, LanguagesPerSite ? managingTranslationsOnSite.StartPageID.ToString() : "global")
				: gateway;
        }
Exemplo n.º 2
0
        /// <summary>Gets the language gateway manaing translations on the given site.</summary>
        /// <param name="managingTranslationsOnSite">the site whose language gateway to get.</param>
        /// <returns>A language gateway filtering languages.</returns>
        public virtual ILanguageGateway GetLanguageGateway(Site managingTranslationsOnSite)
        {
            var gateway = languages;

            if (Enabled && LanguagesPerSite)
            {
                gateway = new SiteFilteringLanguageGateway(languages, managingTranslationsOnSite, persister, languagesCache, descendantFinder);
            }

            return(Cache
                ? new CachingLanguageGatewayDecorator(gateway, cacheWrapper, persister, LanguagesPerSite ? managingTranslationsOnSite.StartPageID.ToString() : "global")
                : gateway);
        }