Added basic i18n
This commit is contained in:
8
i18n/distance.go
Normal file
8
i18n/distance.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package i18n
|
||||
|
||||
func FormatDistance(langPack LangPack, meters float64) string {
|
||||
if meters < 1000 {
|
||||
return UNITS_METER.Text(langPack, meters)
|
||||
}
|
||||
return UNITS_KM.Text(langPack, meters/1000)
|
||||
}
|
||||
Reference in New Issue
Block a user