Skip to content

vue-i18n / general / FormattableProps

Interface: FormattableProps<Value, Format>

Vue I18n Component

Formattable Props

Remarks

The props used in DatetimeFormat, or NumberFormat component

Extends

Type Parameters

Type Parameter
Value
Format

Properties

format?

ts
optional format: string | Format;

Remarks

The format to use in the target component.

Specify the format key string or the format as defined by the Intl API in ECMA 402.


i18n?

ts
optional i18n: Composer<{
}, {
}, {
}, string, never, string>;

Remarks

A composer instance with an existing scope.

This option takes precedence over the scope option.

Inherited from

BaseFormatProps.i18n


locale?

ts
optional locale: string;

Remarks

Specifies the locale to be used for the component.

If specified, the global scope or the locale of the parent scope of the target component will not be overridden and the specified locale will be used.

Inherited from

BaseFormatProps.locale


scope?

ts
optional scope: ComponentI18nScope;

Remarks

Specifies the scope to be used in the target component.

You can specify either global or parent.

If global is specified, global scope is used, else then parent is specified, the scope of the parent of the target component is used.

If the parent is a global scope, the global scope is used, if it's a local scope, the local scope is used.

Inherited from

BaseFormatProps.scope


tag?

ts
optional tag: string | object;

Remarks

Used to wrap the content that is distribute in the slot. If omitted, the slot content is treated as Fragments.

You can specify a string-based tag name, such as p, or the object for which the component is defined.

Inherited from

BaseFormatProps.tag


value

ts
value: Value;

Remarks

The value specified for the target component

Released under the MIT License.