mirror of
https://github.com/lux-tel/session-desktop.git
synced 2026-10-30 20:33:24 +00:00
13 lines
393 B
TypeScript
13 lines
393 B
TypeScript
import { getBrowserLocale } from '../shared';
|
|
|
|
/**
|
|
* @returns a Intl formatter that can be used to do ["Alice", "Bob"].join(', ') in a locale dependent way.
|
|
* i.e. the ', ' is not always what needs to be used to join strings together.
|
|
*/
|
|
export function getLocalizedStringListJoin() {
|
|
return new Intl.ListFormat(getBrowserLocale(), {
|
|
style: 'narrow',
|
|
type: 'conjunction',
|
|
});
|
|
}
|