mapbox / mapbox-gl-language

Switch language of your Mapbox GL JS style
https://mapbox.github.io/mapbox-gl-language/
BSD 3-Clause "New" or "Revised" License
196 stars 51 forks source link

Localize expressions #20

Open 1ec5 opened 6 years ago

1ec5 commented 6 years ago

adaptPropertyLanguage() should attempt to localize expressions used as text-fields. Currently, it only works for constant strings and style functions.

mapbox/mapbox-gl-js#6197 is a proposal to make label localization a built-in feature of the style specification. In the meantime, mapbox/mapbox-gl-native#11651 has a comprehensive implementation of label localization in Objective-C. While that implementation targets NSExpression’s syntax, the same logic should more or less apply when working with style JSON objects.

/cc @lukasmartinelli @tristen @anandthakker

andrewharvey commented 6 years ago

Anyone planning on working on this?

coocy commented 4 years ago

I have forked and made an improved version. Please check this https://github.com/coocy/mapbox-gl-language/ Demo: http://coocy.github.io/mapbox-gl-language/example/

andrewharvey commented 4 years ago

@coocy that's great, are you interested in putting together a PR? I can help review it.

coocy commented 4 years ago

@andrewharvey OK, I'll do this later.

dmytro-gokun commented 3 years ago

@coocy Do you still plan doing that? Maybe you can use some help?