i18n

i18n

Source:

Internationalization Methods and template helpers for i18n, translations, right-to-left (RTL) and currency exchange support

Methods

(static) formatPriceString(formatPrice) → {String}

Return shop/locale specific formatted price. Also accepts a range formatted with " - ".

Source:
Deprecated:
  • Slowly migrating everything to use `formatMoney` from "/imports/utils/formatMoney" instead
Parameters:
Name Type Description
formatPrice String

currentPrice or "xx.xx - xx.xx" formatted String

Returns:

returns locale formatted and exchange rate converted values

Type
String

(static) getLabelsFor(schema, name) → {Object}

Get Labels for simple.schema keys

Source:
Parameters:
Name Type Description
schema Object

schema

name String

name

Returns:

return schema label object

Type
Object

(static) getValidationErrorMessages() → {Object}

Get i18n messages for autoform messages. Currently using a globalMessage namespace only.

  1. Use schema-specific message for specific key
  2. Use schema-specific message for generic key
  3. Use schema-specific message for type

Source:
To Do:
  • Implement messaging hierarchy from simple-schema
Returns:

returns i18n translated message for schema labels

Type
Object