예제 #1
0
 /// <summary>
 /// internal embedded resource reader
 /// </summary>
 internal LanguageReader(LanguageType type)
 {
     _dirPath = type.ResourcePath;
     _external = false;
     _seperator = ".";
     _languageType = type;
 }
예제 #2
0
 private MutableLanguage(LanguageType type,
     Orthography orthography,
     Morphotactics morphotactics,
     MorphemeContainer<Root> roots,
     MorphemeContainer<Suffix> suffixes)
     : base(type, orthography, morphotactics, roots, suffixes)
 {
 }
예제 #3
0
        private static Language CreateInstance(LanguageType type)
        {
            if (type.CultureCode == LanguageType.Turkish.CultureCode)
            {
                return new LanguageReader(type).Read();
            }

            throw new ArgumentException($"Language is not supported: {type}");
        }
예제 #4
0
        public static Language Create(LanguageType type)
        {
            if (!Container.ContainsKey(type))
            {
                var lang = CreateInstance(type);
                Container.Add(type, lang);
            }

            return Container[type];
        }
예제 #5
0
        /// <summary>
        /// Reads external language files and creates a Language object
        /// </summary>
        /// <param name="dirPath"></param>
        public LanguageReader(string dirPath)
        {
            _dirPath = dirPath;

            var dirName = GetDirectoryName(dirPath);
            _languageType = GetLangType(dirName);

            _external = true;
            _seperator = "/";
        }
예제 #6
0
 public LanguageData(LanguageType type)
 {
     Type = type;
 }