LocalizationHelper

Type
Class
Namespace
Craft
Inherits
Craft\LocalizationHelper
Since
1.0

Class LocalizationHelper

See also http://craftcms.com

View source

Public Methods

MethodDescription
findMissingTranslation()Looks for a missing translation string in Yii's core translations.
normalizeNumber()Normalizes a user-submitted number for use in code and/or to be saved into the database.

findMissingTranslation()

Looks for a missing translation string in Yii's core translations.

View source

Arguments

Returns

null

Signature

public static null findMissingTranslation ( CMissingTranslationEvent $event )

normalizeNumber()

Normalizes a user-submitted number for use in code and/or to be saved into the database. Group symbols are removed (e.g. 1,000,000 => 1000000), and decimals are converted to a periods, if the current locale uses something else.

View source

Arguments

  • $number (mixed) – The number that should be normalized.

Returns

mixed – The normalized number.

Signature

public static mixed normalizeNumber ( $number )