Skip to content
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

Language Suport #168

Open
DoctorWho786 opened this issue Oct 9, 2024 · 3 comments
Open

Language Suport #168

DoctorWho786 opened this issue Oct 9, 2024 · 3 comments

Comments

@DoctorWho786
Copy link

Hi
I am building an app that caters to a multinational and multilingual client base. I was wondering if there was a way for the app to communicate with the WebView.

The App already senses the phones default language and shifts to that language. However, the WebView does not. I was wondering if there was a way that I could parse a message to the WebView. sort of like if I had code on the thingsboard platform that listened for a message from the app, received it and then updates the language accordingly.

Is something like this possible?

@ybeshkarov
Copy link
Contributor

Hi,

The webview also reacts on the phone locale but not everything is translated.
Regarding the communication between webview and platform: yes, it's possible. it's how a dashboard works. You may search for openDashboardMessage to see how it's done.

@DoctorWho786
Copy link
Author

cool, thanks

@DoctorWho786
Copy link
Author

DoctorWho786 commented Oct 9, 2024

@ybeshkarov
I changed my phones language to Chinese and all of the app stuff changes automatically but the WebView does not.
However, if i go into my thingsboard cloud account and manually change the user's language to chinese, then the dashboard lables change.

I want this automatic.
1728480064498
1728480064517

At the bottom you can see that the app switches to Chinese by default, however the dashboard does not.
Note: Not all of the labels are meant to change based on language all of them are hard coded except for the access forbidden lable in the table. - Still in order to get this to change i had to manually change my user's language

@thingsboard thingsboard deleted a comment from Vaibhav0216 Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants