예제 #1
0
        /// <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");
        }
예제 #2
0
        /// <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"));
        }