Пример #1
0
        public DomainModel()
        {
            Assembly assembly = GetType().Assembly;

            foreach (string resourceName in assembly.GetManifestResourceNames())
            {
                if (resourceName.StartsWith(App.TranslatableResourcePrefix, StringComparison.InvariantCulture))
                {
                    var file = new TranslatableResXFile(assembly, resourceName);
                    translatableResXFiles.Add(file);
                    file.PropertyChanged += ResXFilePropertyChangedHandler;
                }
            }
            translatableResXFiles.Sort((a, b) => string.Compare(a.BaseName, b.BaseName, StringComparison.CurrentCultureIgnoreCase));
            CurrentLanguage = new CultureInfo("en");
        }
Пример #2
0
        public DomainModel()
        {
            Assembly assembly = GetType().Assembly;

            foreach (string resourceName in assembly.GetManifestResourceNames())
            {
                if (resourceName.StartsWith(App.TranslatableResourcePrefix, StringComparison.InvariantCulture))
                {
                    var file = new TranslatableResXFile(assembly, resourceName);
                    translatableResXFiles.Add(file);
                    file.PropertyChanged += ResXFilePropertyChangedHandler;

                }
            }
            translatableResXFiles.Sort((a, b) => string.Compare(a.BaseName, b.BaseName, StringComparison.CurrentCultureIgnoreCase));
            CurrentLanguage = new CultureInfo("en");
        }
 public TranslatableString(string key, string source, TranslatableResXFile resxFile)
 {
     this.key = key;
     this.source = source;
     this.resxFile = resxFile;
 }
Пример #4
0
 public TranslatableString(string key, string source, TranslatableResXFile resxFile)
 {
     this.key      = key;
     this.source   = source;
     this.resxFile = resxFile;
 }