Exemple #1
0
        /// <summary>
        /// Converts a GSC file (internal representation) into a TransFile (easily translatable).
        /// </summary>
        /// <param name="file">The file to be converted.</param>
        /// <returns>The TransFile representation of the GSC file.</returns>
        public static TransFile FromGSC(GscFile file)
        {
            var trans = new TransFile();

            trans.PopulateFrom(file);

            return(trans);
        }
Exemple #2
0
 /// <summary>
 /// Loads a translation file from the file system.
 /// </summary>
 /// <param name="transFile">The file to be opened for reading.</param>
 /// <returns>The instance of the requested translation file.</returns>
 public static TransFile FromFile(string transFile)
 {
     using (var fileStream = File.OpenRead(transFile))
     {
         var trans = new TransFile();
         trans.PopulateFrom(fileStream);
         return(trans);
     }
 }
Exemple #3
0
 /// <summary>
 /// Converts a GSC file (internal representation) into a TransFile (easily translatable).
 /// </summary>
 /// <param name="file">The file to be converted.</param>
 /// <returns>The TransFile representation of the GSC file.</returns>
 public static TransFile FromGSC(string file)
 {
     return(TransFile.FromGSC(GscFile.FromFile(file)));
 }