示例#1
0
        public static string bindtextdomain(string domain, string directory)
        {
            if (domain.Length == 0)
            {
                return null;
            }

            directory = Path.GetFullPath(directory);

            //directory = Path.Combine(ScriptContext.CurrentContext.WorkingDirectory, directory);

            if (!System.IO.Directory.Exists(directory))
            {
                return null;
            }

            manager = new GettextResourceManager(domain, directory, "{{resource}}.po");

            return directory;
        }
示例#2
0
 public static FileBasedResourceManager CreateFromConfiguration(string name, string section)
 {
     return(GettextResourceManager.CreateFromConfiguration(name, section, "{{culture}}\\{{resource}}.po", ""));
 }