src/mako/validator/rules/traits/I18nAwareTrait.php
protected function translateFieldName(string $field, string $package): string
	{
		// Return custom field name if we have one

		if($this->i18n->has(($i18nKey = $package . 'validate.overrides.fieldnames.' . $field)))
		{
			return $this->i18n->get($i18nKey);
		}

		// Return field a more human friendly field name

		return str_replace('_', ' ', $field);
	}
protected function translateFieldName(string $field, string $package): string
	{
		// Return custom field name if we have one

		if($this->i18n->has(($i18nKey = $package . 'validate.overrides.fieldnames.' . $field)))
		{
			return $this->i18n->get($i18nKey);
		}

		// Return field a more human friendly field name

		return str_replace('_', ' ', $field);
	}
protected function translateFieldName ( string $ field , string $ package ) : string { // Return custom field name if we have one if ( $ this -> i18n -> has ( ( $ i18nKey = $ package . 'validate.overrides.fieldnames.' . $ field ) ) ) { return $ this -> i18n -> get ( $ i18nKey ) ; } // Return field a more human friendly field name return str_replace ( '_' , ' ' , $ field ) ; }
Returns a translated field name.

@param  string $field   Field name
@param  string $package Package prefix
@return string
Returns a translated field name .