Open KHwong12 opened 2 years ago
Possible way is to split the vehicle class involved string to character vector (e.g. 'Private car, Taxi'
-> c('Private car', 'Taxi')
, then wrap it with i18n$t()
one by one.
lapply(unlist(strsplit(filter_collision_data()$vehicle_class_involved, split = ", ")), function(x) i18n$t(x))
As stated in #76, details of vehicles involved aren't translated when collision includes more than 1 vehicle type (e.g. Private car, Taxi).