Localized week days on android
I'm trying to implement something like sc开发者_开发技巧heduling in my application, so I need to get names of all the day in a week and show it to user. It is simple: i can just make an enum with all the days and use it, but the localization problem shows up. The list will have english lables always. Is there a way to localize the days of week simply?
Thanks.
Why don't you use the built-in mechanism? See the doc.
you can make a function that gets as a parameter one of these enums, and returns a resource string.
精彩评论