Skip to content
A Flutter package to read and return the set device locales
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea initial commit Feb 1, 2019
android
example added currentLocale call Feb 15, 2019
ios added currentLocale call Feb 15, 2019
lib
.gitattributes
.gitignore
.metadata
CHANGELOG.md added currentLocale call Feb 15, 2019
LICENSE
README.md
devicelocale.iml initial commit Feb 1, 2019
pubspec.yaml

README.md

devicelocale

Gets the device locale data, independent of the app locale settings.

Usage

import 'package:devicelocale/devicelocale.dart';

then

List languages = await Devicelocale.preferredLanguages;
String locale = await Devicelocale.currentLocale;

this should return a list of the preferred/current language locales setup on the device, with the current one being the first in the list or just the currently set device locale.

iOS

When first created this was a Swift based plugin, but due to these issues the Swift code has been removed and it now uses a simple Objective C call.

Getting Started

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

You can’t perform that action at this time.