Skip to content

Commit 6d8fa24

Browse files
committed
Add methods to App to retrieve locale information
1 parent 7976260 commit 6d8fa24

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/App.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,21 @@ public function isHidden(): bool
3434
return $this->client->get('app/is-hidden')->json('is_hidden');
3535
}
3636

37+
public function getLocale(): string
38+
{
39+
return $this->client->get('app/locale')->json('locale');
40+
}
41+
42+
public function getLocaleCountryCode(): string
43+
{
44+
return $this->client->get('app/locale-country-code')->json('locale_country_code');
45+
}
46+
47+
public function getSystemLocale(): string
48+
{
49+
return $this->client->get('app/system-locale')->json('system_locale');
50+
}
51+
3752
public function version(): string
3853
{
3954
return $this->client->get('app/version')->json('version');

src/Facades/App.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
* @method static void focus()
1111
* @method static void hide()
1212
* @method static bool isHidden()
13+
* @method static string getLocale()
14+
* @method static string getLocaleCountryCode()
15+
* @method static string getSystemLocale()
1316
* @method static string version()
1417
* @method static int badgeCount($count = null)
1518
* @method static void addRecentDocument(string $path)

0 commit comments

Comments
 (0)