Question

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!

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top