Skip to content

Commit

Permalink
Support per-app language preferences
Browse files Browse the repository at this point in the history
  • Loading branch information
Kr0oked committed Feb 11, 2023
1 parent 4518b84 commit 4c08cbd
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ android {
versionName '1.9'

testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'

resConfigs 'bs', 'cs', 'de', 'el', 'fi', 'hr', 'mk', 'nl', 'ru', 'sr', 'tr'
}

buildTypes {
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!--
~ This file is part of Compass.
~ Copyright (C) 2022 Philipp Bobek <philipp.bobek@mailbox.org>
~ Copyright (C) 2023 Philipp Bobek <philipp.bobek@mailbox.org>
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -37,6 +37,7 @@
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:localeConfig="@xml/locales_config"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Compass">
Expand Down
34 changes: 34 additions & 0 deletions app/src/main/res/xml/locales_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>

<!--
~ This file is part of Compass.
~ Copyright (C) 2023 Philipp Bobek <philipp.bobek@mailbox.org>
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ Compass is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->

<locale-config xmlns:android="http://schemas.android.com/apk/res/android">
<locale android:name="bs" />
<locale android:name="cs" />
<locale android:name="de" />
<locale android:name="el" />
<locale android:name="en" />
<locale android:name="fi" />
<locale android:name="hr" />
<locale android:name="mk" />
<locale android:name="nl" />
<locale android:name="ru" />
<locale android:name="sr" />
<locale android:name="tr" />
</locale-config>

0 comments on commit 4c08cbd

Please sign in to comment.