Open GoogleCodeExporter opened 9 years ago
The general solution is not as simple as just just returning a value and a unit
separately. Many tags have a more complex structure than that.
It's my feeling that having TagDescriptor classes support localisation of
strings is the most robust and idiomatic approach.
I've renamed the issue accordingly.
Comments on how to perform this are welcome.
Original comment by drewnoakes
on 3 Jun 2013 at 11:15
As far as localising getDescription(), I guess the simplest initial approach
would be to add an alternate getDescription method with a Locale parameter. The
default would then delegate to that one with Locale.getDefault() and the
remaining problem is then finding people to translate the strings
(unfortunately that is the biggest pain...)
Having a way to get the unit separately from the number/date/whatever, however,
is still useful for me in cases where this is possible (I'd like to be able to
index the values as their original types.) Essentially, at the moment I can get
"Image Width" and "300 pixels" but what I'd rather generate is "Image Width
(pixels)" and 300. The latter allows me to index numbers as numbers and then
opens up the ability to do queries on ranges.
Original comment by trejkaz
on 3 Jun 2013 at 1:10
Original issue reported on code.google.com by
trejkaz
on 28 May 2013 at 2:05