import { getLangNameFromCode } from 'language-name-map';
$: namedLocales = $locales
- .map((code) => ({
- code,
- ...getLangNameFromCode(code)
- }))
- .sort((a, b) => a.native - b.native);
+ .map((code) => ({
+ code,
+ ...getLangNameFromCode(code)
+ }))
+ .sort((a, b) => a.native - b.native);
- let selected = $locale
+ let selected = $locale;
$: {
- locale.set(selected);
+ locale.set(selected);
}
</script>