Esempio n. 1
0
        public static Locale CreateLocale(LocaleIdentifier identifier)
        {
            var locale = CreateInstance <Locale>();

            locale.m_Identifier = identifier;
            if (locale.m_Identifier.CultureInfo != null)
            {
                locale.name = locale.m_Identifier.CultureInfo.EnglishName;
            }
            return(locale);
        }
 /// <summary>
 /// Attempt to retrieve a Locale using the identifier.
 /// </summary>
 /// <param name="id"><see cref="LocaleIdentifier"/> to find.</param>
 /// <returns>If no Locale can be found then null is returned.</returns>
 public virtual Locale GetLocale(LocaleIdentifier id)
 {
     foreach (var locale in Locales)
     {
         if (locale.Identifier.Equals(id))
         {
             return(locale);
         }
     }
     return(null);
 }
Esempio n. 3
0
 public bool Equals(LocaleIdentifier other)
 {
     return(Code == other.Code);
 }