/// <summary> /// Gets the name of the file. /// </summary> /// <param name="stringObject">The string object.</param> /// <returns>System.String.</returns> protected string GetFileName(LocalizedStringData stringObject) { var path = _appPaths.LocalizationPath; var name = Path.Combine(path, stringObject.Prefix + "strings-" + CultureInfo.CurrentCulture + ".xml"); if (File.Exists(name)) { return name; } name = Path.Combine(path, stringObject.Prefix + "strings-" + CultureInfo.CurrentCulture.Parent + ".xml"); if (File.Exists(name)) { return name; } //just return default return Path.Combine(path, stringObject.Prefix + "strings-en.xml"); }
/// <summary> /// Gets the name of the file. /// </summary> /// <param name="stringObject">The string object.</param> /// <returns>System.String.</returns> protected string GetFileName(LocalizedStringData stringObject) { var path = _appPaths.LocalizationPath; var name = Path.Combine(path, stringObject.Prefix + "strings-" + CultureInfo.CurrentCulture + ".xml"); if (File.Exists(name)) { return(name); } name = Path.Combine(path, stringObject.Prefix + "strings-" + CultureInfo.CurrentCulture.Parent + ".xml"); if (File.Exists(name)) { return(name); } //just return default return(Path.Combine(path, stringObject.Prefix + "strings-en.xml")); }