Beispiel #1
0
 /// <summary>
 /// Gets a specific string for a specified language code.
 /// </summary>
 /// <param name="LangCode">The language code.</param>
 /// <param name="Index">The index of the string to retrieve.</param>
 /// <returns>A string.</returns>
 public string GetString(LanguageCodes LangCode, ObjectStringIndices Index)
 {
     try
     {
         return(Strings[LangCode][(int)Index].TranslatedStr);
     }
     catch (Exception)
     {
         return("");
     }
 }
Beispiel #2
0
 /// <summary>
 /// Adds a string to this STR chunk.
 /// If it exists, it will be replaced
 /// </summary>
 /// <param name="Str">The TranslatedString instance to add.</param>
 /// <param name="Index">The index of the string to add. Typically 0 through 2 for objects
 /// where 0 is the name, 1 is the price and 2 is the description.</param>
 public void AddString(TranslatedString Str, ObjectStringIndices Index)
 {
     Strings[Str.LangCode][(int)Index] = Str;
 }