开发者

Localized week days on android

开发者 https://www.devze.com 2023-01-24 20:18 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消