I would like to display the left millis of a countdown timer in this format: "13d, 11h:12m:14s". I can calculate the times/days, but I need the short letter of each type of the data/time by default Locale language of the device.

Example:

English: day -> d, etc 
German: tage -> t, etc, 
Hungarian: nap -> n, etc 

I would not like to make these letters static if there is any solution to do the above format with a class. Thanks for help!

有帮助吗?

解决方案

Checked the source and the platform itself does not have pre-translated strings for abbreviated days, hours and so on.

Your safest option is to provide the correct abbreviations in localized string resources of your own in all languages your app supports.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top