@skippay/capacitor-localization-settings
Version:
Capacitor module to expose per-app language preferences API on iOS and Android.
30 lines (22 loc) • 859 B
JavaScript
var capacitorLocalizationSettings = (function (exports, core) {
'use strict';
const LocalizationSettings = core.registerPlugin('LocalizationSettings', {
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.LocalizationSettingsWeb()),
});
class LocalizationSettingsWeb extends core.WebPlugin {
async getLanguage() {
return { value: navigator.language };
}
async setLanguage(options) {
return options;
}
}
var web = /*#__PURE__*/Object.freeze({
__proto__: null,
LocalizationSettingsWeb: LocalizationSettingsWeb
});
exports.LocalizationSettings = LocalizationSettings;
Object.defineProperty(exports, '__esModule', { value: true });
return exports;
})({}, capacitorExports);
//# sourceMappingURL=plugin.js.map