Ejemplo n.º 1
0
 /// <summary>
 /// internal embedded resource reader
 /// </summary>
 internal LanguageReader(LanguageType type)
 {
     _dirPath = type.ResourcePath;
     _external = false;
     _seperator = ".";
     _languageType = type;
 }
Ejemplo n.º 2
0
 private MutableLanguage(LanguageType type,
     Orthography orthography,
     Morphotactics morphotactics,
     MorphemeContainer<Root> roots,
     MorphemeContainer<Suffix> suffixes)
     : base(type, orthography, morphotactics, roots, suffixes)
 {
 }
Ejemplo n.º 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}");
        }
Ejemplo n.º 4
0
        public static Language Create(LanguageType type)
        {
            if (!Container.ContainsKey(type))
            {
                var lang = CreateInstance(type);
                Container.Add(type, lang);
            }

            return Container[type];
        }
Ejemplo n.º 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 = "/";
        }
Ejemplo n.º 6
0
 public LanguageData(LanguageType type)
 {
     Type = type;
 }