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