Localization

Type
Abstract Class
Namespace
craft\commerce\helpers
Inherits
craft\commerce\helpers\Localization » craft\helpers\Localization (opens new window)
Since
3.4.10

Localization Helper

View source (opens new window)

# Public Methods

Method Description
findMissingTranslation() (opens new window) Looks for a missing translation string in Yii's core translations.
normalizeLanguage() (opens new window) Normalizes a language into the correct format (e.g. en-US).
normalizeNumber() (opens new window) Normalizes a user-submitted number for use in code and/or to be saved into the database.
normalizePercentage() Normalizes a percentage value into a float.

# normalizePercentage()

Normalizes a percentage value into a float.

View source (opens new window)

Arguments

Returns

float (opens new window), null (opens new window)