Language parameter URL not Changing Language

I am using the app text feature for the purposes of doing language translation

Set up in the language settings of app editor

Settings on page to display the text that is going to be translated

Settings of workflows to change the lang URL parameter to change the app text and therefore translate

I understand that when I use the navigation go to page and send a parameter that it is not really going to a new page, and so it is not really refreshing the page…for example, if you have a customs state set and then use navigation to go to the same page but change some URL parameters the custom state set remains unchanged, but if you refresh the page the custom state will be changed.

The issue is that I would assume the URL parameter for language settings would get automatically detected and change the language setting based on the URL parameter currently in the URL…so if I want to set up my app to allow a user to select between three languages and it is not saved to their user type but instead I just change the URL lang parameter, that the page app text will automatically read the URL lang parameter and change accordingly----this is not happening.

Instead I am forced to refresh the page to get the app text to change to the language that is in the lang URL parameter.

This seems like a bug…the reason it seems like a bug is because I can set a group to have a different background color based on the URL parameter and it will change it’s background color when the URL parameter in the condition is changed…in the same idea I can set elements to be visible or not visible based on a URL parameter and the page does not need to be refreshed to have those settings recognized.

This is what is happening in my language settings

language (1)

Notice how the flags change when the URL is changed, that is because of the conditional settings

The app text and translation of that app text should work the same exact way and not require a page refresh.

You don’t have to reload the page. Just update some state that holds the current language. Change that state and… Boom, errrthing that depends on that state will change.

1 Like

While the approach @keith described works for most things (such as data fetched from the DB), it’s not clear that it works with the built-in App Text feature. In fact, the docs state…

After changing this [the “lang” URL parameter], users should refresh the page for the latest language texts to be included.

I haven’t experimented with that feature much, but it seems like what @boston85719 describes is the intended behavior.

I see now in the docs that it does state

After changing this, users should refresh the page for the latest language texts to be included

That is a huge design flaw in my opinion, and I do believe that it could be fixed as a non-coder it seems like if the conditionals work instantly based on a change in URL, then the app text should be able to as well.

But what @keith states of the conditional approach is a workaround, but it would require a lot more tedious work to change the conditional states of every button and element, even if those elements may use the same text.

Would be some much easier if the app text just worked like a conditional and changed automatically when the lang URL parameter changed instead of requiring a page refresh.

Any way to force a page refresh? Obviously not a way to do it and save custom states on the page, which is a huge bummer, but until Bubble readdress the issue it would be the only way to actually have a user select a language and not just jump ship as they don’t see the language change take place.

@eve could we add this to ideas of how to improve app text, so as to not require a page refresh?

1 Like

I see this now

Screen Shot 2020-08-05 at 10.46.20 PM

I think using the Open an external website action would work as well…

1 Like

This topic was automatically closed after 14 days. New replies are no longer allowed.