[Android] Multi-language support (or at least the basic foundation of it).

Added an example translation (Japanese). So now the Android version can both display in English and Japanese, depending on what the Android device's system language is set to.

Also did a tiny clean-up of InputConfigItem.java so that the parameters are slightly more descriptive.

Now, to do a translation in [x] language, all you have to do is take the normal English strings.xml and translate the XML entries into said language, and simply make a folder in the /res/ sub-directory in the form of values-[region code]. IE) With the Japanese translation, it is in the folder /res/values-ja

No configuration other than that is needed. After doing the above, the language should load fine on any device when set to that specific system language.

By default, if a translation file does not exist for a given system language. The app will automatically fall back to using the English translation.

This *should* be bug-free since I did check everything multiple times. But if any issues occur, please report them so that I can fix them.
This commit is contained in:
Lioncash
2013-08-12 21:22:20 -04:00
parent 3b272d81b4
commit b823983199
11 changed files with 244 additions and 77 deletions

View File

@ -2,23 +2,23 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
>
<PreferenceCategory
android:summary="Settings"
android:title="CPU Settings"
android:summary="@string/settings"
android:title="@string/cpu_settings"
android:key="cpuprefcat">
<CheckBoxPreference
android:key="dualcorepref"
android:summary="On/Off"
android:title="Dual Core" />
android:summary="@string/on_off"
android:title="@string/dual_core" />
</PreferenceCategory>
<PreferenceCategory
android:summary="Settings"
android:title="Video Settings"
android:summary="@string/settings"
android:title="@string/video_settings"
android:key="videoprefcat">
<ListPreference
android:entries="@array/gpuOptions"
android:entryValues="@array/gpuValues"
android:key="gpupref"
android:summary="Video backend to use"
android:title="Video Backend" />
android:summary="@string/video_backend_to_use"
android:title="@string/video_backend" />
</PreferenceCategory>
</PreferenceScreen>