Update widget locale


#1

Is there any way to force the widget to update when the UPLOADCARE_LOCALE setting is updated? We need the ability to update all text throughout the app when the user changes their locale. I’m not seeing the translations in the widget change after updating the global setting.


#2

@developers by default, the locale doesn’t change dynamically when you update the value of the UPLOADCARE_LOCALE variable. However, there is a bit tricky way that rebuilds the widget with the updated locale settings. You can find a working demo here

Hope that helps.


#3

This is working for us! Thanks so much for the workaround!


#4

Well it’s sort of working… it seems that the file and camera tabs update their translations but the other tabs we are using (gphotos, instagram and facebook) don’t update.


#5

@developers, yes that’s true. This way of changing the locale is a kind of a “hack,” and it doesn’t affect text captions in cloud/social tabs which are rendered within an iframe.

Hopefully, we’ll implement a proper locale updating in the next major version of the widget we’re working on.


#6

Ok thanks for the details! We look forward to that feature!