Ryosuke839 / UnicodePad

An Android App that enables input every character in Unicode
https://play.google.com/store/apps/details?id=jp.ddo.hotmist.unicodepad
Apache License 2.0
314 stars 32 forks source link

Locale switcher suggestions and improvements #92

Open Liggliluff opened 3 years ago

Liggliluff commented 3 years ago

Let users customise the locale order

As of now, users can customise the tab order, and also save favourites, so there is some customisation. So I'm thinking an option in settings for customising the locale menu would work great; the option could work similarly to the app's input list and the system's language switcher: you have a list of all the added languages, you can drag to reorder, or swipe to remove, and at the bottom you have an option to add another locale.

But keep the "other" option in the dropdown, just for those moments the user just wants to temporarily select a locale.

Display language name in the list

Since the width of the popup/dropdown box isn't tied to the closed box you initially press on, the box can expand in width to allow for language names. I'm not sure about the exact format, but since the locale names contains parentheses, it would be good to avoid that. One idea is: xx_XX, language (country)

Add search to the locale list

The list is long, and since search has been added to the Unicode block list, a similar search would work great for the locale picker.

Missing locales

The list contains both basic locales like en and more precise locales like en_GB en_US, but the locales currently in the dropdown: zh_CN zh_TW zh_HK zh_MO aren't available as exact codes, and only with #Hans and #Hant. While it doesn't really matter in the end if you pick one of those or not. I'm thinking that when a user customises their list, they might want the shorter variant. I've seen other apps populate the list with additional locales, so it should be possible. – Also consider adding tlh (Klingon), which is part of CLDR but not on the list.

The selector goes blank for extended locales

Any locale that isn't simply 2 or 3 letters makes it go blank, such as af_NA, en_001. Picking ko_KR will instead highlight the one from the list, but selecting ko_KP makes it go blank.

Liggliluff commented 3 years ago

Oh, and of course, xx_XX, language (country) should be a string, something like %1$s, %2$s, since it's going to be formatted differently per language. Looking at CLDR » localeSeparator, that would be %1$s,%2$s for yue, yue_Hans, zh, zh_Hant and %1$s、%2$s for ja, as an example.