Send files directly between devices over the internet - no cloud storage, no size limits.
TypeScript cross-platformdata-transferdecentralizedfile-sharingfile-transferhole-punchingopen-sourcep2ppeer-to-peerprivacyprivacy-tools
import {
SYSTEM_LOCALE_PREFERENCE,
normalizeLocalePreference,
type LocalePreference
} from '@altersend/locales'
const KEY = 'altersend.locale.preference'
export function getSavedLocalePreference(): LocalePreference {
try {
return normalizeLocalePreference(window.localStorage.getItem(KEY))
} catch {
return SYSTEM_LOCALE_PREFERENCE
}
}
export function setSavedLocalePreference(preference: LocalePreference): void {
try {
window.localStorage.setItem(KEY, preference)
} catch {
return
}
}
export function getBrowserLocales(): string[] {
return [...navigator.languages]
}