-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change language on maps through Mapbox #3371
Comments
For the new version of Mapbox (Mapbox GL JS) which only RouteBuilder and (soon) Gallery use, the update is pretty easy. We just need to use the For the old version of Mapbox (Mapbox.js), which most of our maps use (for now), the process is a bit more annoying. It's still manageable though!
Then I'll probably add the different layer names as "translations" in the |
Can we upgrade to new Mapbox everywhere? Or does this not make sense from
an effort - ROI standpoint.
Sent from phone
…On Thu, Aug 24, 2023 at 4:08 PM Michael Saugstad ***@***.***> wrote:
For the new version of Mapbox (Mapbox GL JS) which only RouteBuilder and
(soon) Gallery use, the update is pretty easy. We just need to use the
.setLayoutProperty() method, as described here
<https://docs.mapbox.com/help/troubleshooting/change-language/#change-label-language-dynamically>
.
For the old version of Mapbox (Mapbox.js), which most of our maps use (for
now), the process is a bit more annoying. It's still manageable though!
- Head to https://studio.mapbox.com/
- Create a copy of the "light-zh-TW" or "streets-zh-TW" map
- Edit all of the *-labels layers. For almost all of them there is a
field that has something like coalesce(name_en, name), and you should
edit the one with the language code to the desired code.
- You can then edit the name of the layer in the top-left, name it
using the language code
- Publish the style
Then I'll probably add the different layer names as "translations" in the
common.json file.
—
Reply to this email directly, view it on GitHub
<#3371 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAML55OMX5DYDFG7HKS5DPLXW7NFXANCNFSM6AAAAAA3YZ4WGY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I do think that we should do and it's worth it! The issue is #2194 We're doing these first few maps with the newer version of Mapbox to get a feel for it before making a migration, but I think that we should do it. That being said, making new layers for the old version of mapbox will take less than an hour, so I still think it's worth it to make this update for the old version of Mapbox in the interim. |
Nice. OK! |
Brief description of problem/feature
Looks like our maps that we get through Mapbox are still using English by default. I'm sure that there is a setting for this. Note that almost all of our maps are using the old "Mapbox.js", but we are using the newer "Mapbox GL JS" in RouteBuilder.
The text was updated successfully, but these errors were encountered: