Returns the gender for use in stand-alone name display

In practice: starts uppercase

@param string $locale
@return array gender => string
975149
public function getGenderHello($locale = null)
    {
        return array('M' => $this->_('Mr.', $locale), 'F' => $this->_('Mrs.', $locale), 'U' => $this->_('Mr./Mrs.', $locale));
    }
412794
private function parse($locale)
    {
        $parts = explode('_', $locale);

        $localization = new Localization();
        $localization->setLanguage($parts[0]);
        if (count($parts) > 1) {
            $localization->setCountry($parts[1]);
        }

        return $localization;
    }
206936
private static function _checkLocale($locale)
    {
        if (empty($locale)) {
            $locale = new Zend_Locale();
        }

        if (!(Zend_Locale::isLocale((string) $locale, null, false))) {

            throw new Zend_Locale_Exception("Locale (" . (string) $locale . ") is a unknown locale");
        }

        return (string) $locale;
    }
992990
public function getGenders($locale = null)
    {
        return array('M' => $this->_('Male', $locale), 'F' => $this->_('Female', $locale), 'U' => $this->_('Unknown', $locale));
    }
764157
public static function canonicalize($locale)
    {
        $locale = (string) $locale;

        if ('' === $locale || '.' === $locale[0]) {
            return self::getDefault();
        }

        if (!preg_match('/^([a-z]{2})[-_]([a-z]{2})(?:([a-z]{2})(?:[-_]([a-z]{2}))?)?(?:\..*)?$/i', $locale, $m)) {
            return $locale;
        }

        if (!empty($m[4])) {
            return strtolower($m[1]).'_'.ucfirst(strtolower($m[2].$m[3])).'_'.strtoupper($m[4]);
        }

        if (!empty($m[3])) {
            return strtolower($m[1]).'_'.ucfirst(strtolower($m[2].$m[3]));
        }

        return strtolower($m[1]).'_'.strtoupper($m[2]);
    }
1279183
public static function get($locale = null)
    {
        $locale = $locale ?: 'en';

        if (!isset(static::$singletons[$locale])) {
            static::$singletons[$locale] = new static($locale ?: 'en');
        }

        return static::$singletons[$locale];
    }
1115943
public static function replaceAlias($locale)
    {
        if (!empty($locale) && isset(self::$aliases[$locale])) {
            $locale = self::$aliases[$locale];
        }

        return $locale;
    }
707558
public static function canonicalize($locale)
    {
        if (empty($locale)) {
            return $locale;
        }

        $locale = str_replace('_', '-', strtolower($locale));
        $localeParts = explode('-', $locale);
        foreach ($localeParts as $index => $part) {
            if ($index === 0) {
                // The language code should stay lowercase.
                continue;
            }

            if (strlen($part) == 4) {
                // Script code.
                $localeParts[$index] = ucfirst($part);
            } else {
                // Country or variant code.
                $localeParts[$index] = strtoupper($part);
            }
        }

        return implode('-', $localeParts);
    }
1253315
public function getchangedI18N($locale=null) {
		if(!$locale)
			return array_keys($this->translationschanged);
		elseif(isset($this->translationschanged[$locale]))
			return array_keys($this->translationschanged[$locale]);
		else
			return [];
	}
1330364
public function retrieveTypePrivatePerson($locale)
    {
        $customerType = new CustomerType();
        $customerType->setId(self::TYPE_PRIVATE_PERSON_ID);
        $customerType->setName(
            $this->retrieveTranslator($locale)->trans(
                'salescore.customer-type.private-person',
                [],
                self::TRANSLATION_DOMAIN
            )
        );

        return $customerType;
    }
328248
public function getI18n( $locale = null )
	{
		$locale = ( $locale !== null ? $locale : $this->getLocale()->getLanguageId() );

		if( !isset( $this->_i18n[$locale] ) ) {
			/// Locale ID %1$s
			throw new MShop_Exception( sprintf( 'Internationalization object not available for "%1$s"', $locale ) );
		}

		return $this->_i18n[$locale];
	}
126083
public function getUri( $locale = null )
    {
        if ( empty( $locale ) )
        {
            $locale = $this->getLocale();
        }

        return '/app/'
             . $locale
             . '/user/view/'
             . rawurlencode( $this->displayName );
    }
2168
public function lookUpLanguageIdForLocale($locale)
    {
        $locale = $this->normalizeLocale($locale);

        /** @var Model $languageModel */
        $languageModel = static::$cmsLanguageModel;

        $language = $languageModel::where(config('pxlcms.translatable.locale_code_column'), $locale)
            ->remember((config('pxlcms.cache.languages', 15)))
            ->first();

        if (empty($language)) return null;

        return $language->id;
    }
1185231
public function locale($locale = null)
    {
        if ($locale) {
            // Normalize the language
            self::$locale = strtolower(str_replace([' ', '_'], '-', $locale));
        }

        return self::$locale;
    }
698667
public function isValidLocale($locale)
    {
        $locale = strtoupper($locale);
        if (substr_count($locale, '_')) {
            $locale = substr($locale, strpos($locale, '_') + 1);
        }

        if (substr_count($locale, '-')) {
            $locale = substr($locale, strpos($locale, '-') + 1);
        }

        return in_array($locale, $this->countryList);
    }
1190523
public static function getLanguageFromLocale($locale)
    {
        if (strpos($locale, '_')) {
            $parts = explode('_', $locale);

            return strtolower($parts[0]);
        }

        return $locale;
    }
1207297
public function getTitle($locale = null)
    {
        if ($locale && isset($this->title[$locale])) {
            return $this->title[$locale];
        }

        if (isset($this->title['default'])) {
            return $this->title['default'];
        }

        return $this->getOriginalName();
    }