Join the Webstudio community

Updated 4 months ago

Internationalization

At a glance

The community member is a developer looking for information on creating internationalized pages in Webstudio. They ask about pulling data from a CMS based on the language slug in the URL, auto-detection of browser language, and handling unsupported languages. The comments provide some insights:

- There is an issue with accessing system variables from slots, which is needed to get the language variable from the URL. This is a blocker for the current approach.

- There is no auto-detection of browser language. The idea is to have the locale in the URL.

- A community member suggests that custom auto-detection with client-side JavaScript could be used to forward users to a supported language if the initial one is not supported.

Useful resources
Developer here! What is the current way of creating internationalized pages in webstudio? Can't find a tutorial on this - I suppose this would mean to somehow pull different data from a CMS based on the language slug in the url?

Is there auto-detection of the browser language?
What about languages in the url that are not supported yet - Can I set up auto redirection to a supported language?
b
O
5 comments
Some insight on this would be greatly appreciated!
there is one big issue: https://github.com/webstudio-is/webstudio/issues/4166

Currently you can't access system variable from slots. This is a problem when you need to reuse the instnaces between pages.

You need this to get the language variable from the url.

If you are not blocked by this the rest should work.

We didn't make a tutorial because of that.
There is no auto-detection. The idea is that your urls have locale in them
you could add a custom autodetection with client-side js I guess if you wanted to forward someone to a different language than the initial one.
Thanks @Oleg Isonen ! that's sufficient information currently πŸ™‚
Add a reply
Sign up and join the conversation on Discord