Skip to content

list
@localizer/format 1.1.1

The list formats a list of elements by combining them using a separator that adheres to the conventions of the specified locale.

Usage

typescript
import { 
loc
} from '@localizer/core';
import {
list
} from '@localizer/format';
const
values
= [
loc
`A`,
loc
`B`,
loc
`C`,
loc
`D`];
const
result
=
list
(
values
);

Demo

LocaleLocalized value
en-US  American EnglishA, B, C, D
fr-FR  French (France)A, B, C et D
de-DE  German (Germany)A, B, C und D
fi-FI  Finnish (Finland)A, B, C ja D
sv-FI  Swedish (Finland)A, B, C, D
ko-KR  Korean (South Korea)A B C D
hi-IN  Hindi (India)A, B, C, और D

See also