java中距离的国际化 [英] Internationalization of distances in java

查看:151
本文介绍了java中距离的国际化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Java中是否有可能没有任何额外的库来国际化距离?

Is it possible in Java without any extra library to internationalize distances?

我的意思是可以用日期,时间,货币,数字处理它...

I mean it is possible to handle that with date, time, currencies, numbers...

我原本希望找到一个NumberFormat.getDistanceInstance或者什么。

I would have expected to find a NumberFormat.getDistanceInstance or something.

是否已经嵌入了类似的内容或者我应该建立自己的距离国际化系统(大多数英里对公里)

Is there something like that already embedded or should i make my own internationalization system for distances (mostly miles vs kilometers)

推荐答案

我很想听到这样的格式化程序但是不幸的是我从未这样做过。问题是,CLDR中还没有这样的数据,所以这并不容易。

I would love to hear about such formatter but unfortunately I never did. The problem is, there is no such data in CLDR yet, so it is not to easy to do.

这就是说人们实际上是想到这个 - 请参阅ICU的测量课程。不幸的是,现在看来,你可以得到的是确定测量系统 - 参见 LocaleData LocaleData.MeasurementSystem

之后你就可以自己动手了。您需要将其保留给翻译人员(他们需要实际翻译单位以及格式化模式)。

That is to say that people actually think about this for quite a while – see ICU's Measure class. Unfortunately for now, it seems as close you can get is to determine measurement system – see LocaleData and LocaleData.MeasurementSystem.
After that you are on your own. You would need to leave this for translators (they need to actually translate units as well as formatting pattern).

这篇关于java中距离的国际化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆