public static void Compose(string domainName, NGettextWpfDependencyResolver dependencyResolver = null)
        {
            dependencyResolver ??= new NGettextWpfDependencyResolver();

            var cultureTracker = dependencyResolver.ResolveCultureTracker();
            var localizer      = new Localizer(cultureTracker, domainName);

            CompositionRoot.Initialize(cultureTracker, localizer);
        }
Example #2
0
        public static void Compose(string domainName, NGettextWpfDependencyResolver dependencyResolver = null)
        {
            if (dependencyResolver is null)
            {
                dependencyResolver = new NGettextWpfDependencyResolver();
            }

            var cultureTracker = dependencyResolver.ResolveCultureTracker();
            var localizer      = new Localizer(cultureTracker, domainName);

            ChangeCultureCommand.CultureTracker        = cultureTracker;
            GettextExtension.Localizer                 = localizer;
            TrackCurrentCultureBehavior.CultureTracker = cultureTracker;
            LocalizeEnumConverter.EnumLocalizer        = new EnumLocalizer(localizer);
            Translation.Localizer = localizer;
        }