Skip to content

Commit b8f9c12

Browse files
Add link for future reference
1 parent 893a227 commit b8f9c12

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

app/src/main/java/org/schabi/newpipe/util/Localization.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -437,11 +437,13 @@ private static String getQuantity(@NonNull final Context context,
437437
return context.getResources().getQuantityString(pluralId, safeCount, formattedCount);
438438
}
439439

440+
// Starting with pull request #12093, NewPipe exclusively uses Android's
441+
// public per-app language APIs to read and set the UI language for NewPipe.
442+
// The following code will migrate any existing custom app language in SharedPreferences to
443+
// use the public per-app language APIs instead.
444+
// For reference, see
445+
// https://android-developers.googleblog.com/2022/11/per-app-language-preferences-part-1.html
440446
public static void migrateAppLanguageSettingIfNecessary(@NonNull final Context context) {
441-
// Starting with pull request #12093, NewPipe exclusively uses Android's
442-
// public per-app language APIs to read and set the UI language for NewPipe.
443-
// The following code will migrate any existing custom app language in SharedPreferences to
444-
// use the public per-app language APIs instead.
445447
final SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
446448
final String appLanguageKey = context.getString(R.string.app_language_key);
447449
final String appLanguageValue = sp.getString(appLanguageKey, null);

0 commit comments

Comments
 (0)