hbb20 / hbb20/CountryCodePickerProject
Using Java's own Locale data for region names
- Ngôn ngữ chính
- Java
- Star
- 1.5k
- Fork
- 509
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Instead of having to duplicate and manually translate the region names and data with the raw xml files, Java's build-in Locale data could probably be used.
Current we are using a following trick to generate a list of localized country names for the user to select from:
// Code in Kotlin
```
Locale
.getISOCountries() // Fetch list of ISO 3166 country codes
.map { // Create a new Locale in users default language, but set country to X
it to Locale("", it).displayCountry // then extract the localized name of the country.
}
.toMap() // Turn into Map with ISO 3166 key and Localised country name as value
```
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
The issue mentions the raw XML files and the Kotlin Locale.getISOCountries().displayCountry flow, but no repository files or tests. Locate the current region-name data and generation entry point, then compare them with Java Locale behavior. Done means the agreed data source is selected and the country-name generation is updated with verification for the existing use case.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- android, java, kotlin
- Lĩnh vực
- internationalization, mobile
- Loại issue
- Tái cấu trúc
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 35/100