如何使用阿拉伯数字获取阿拉伯格式的日期和时间文本。 Android

How to get date and time text in arabic format with arabic digits. Android

以下代码 return 为英文格式,但我想要阿拉伯语
currentDate.format(日期格式化程序)
currentTime.format(TimeFormatter)

示例:
预期:١٢:٠٠
实际:12:00

...
        var dateString: String = ""
        var timeString: String = ""
...

        val DateFormatter = DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL).withLocale(Locale( "ar"))
        val TimeFormatter = DateTimeFormatter.ofLocalizedDate(FormatStyle.SHORT).withLocale(Locale( "ar"))

        val currentDate = LocalDate.now()
        val currentTime = LocalTime.now()


        dateString = currentDate.format(DateFormatter)
        timeString = currentTime.format(TimeFormatter)
...

val DateFormatter = DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL).withDecimalStyle(DecimalStyle.of(Locale("ar")))
val TimeFormatter = DateTimeFormatter.ofLocalizedDate(FormatStyle.SHORT).withDecimalStyle(DecimalStyle.of(Locale("ar")))