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
Locale | Localized value |
---|---|
en-US | A, B, C, D |
fr-FR | A, B, C et D |
de-DE | A, B, C und D |
fi-FI | A, B, C ja D |
sv-FI | A, B, C, D |
ko-KR | A B C D |
hi-IN | A, B, C, और D |