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

Fetch the user's UI language with Puter.js #1103

Open
Zac0511 opened this issue Feb 3, 2025 · 0 comments
Open

Fetch the user's UI language with Puter.js #1103

Zac0511 opened this issue Feb 3, 2025 · 0 comments
Labels
idea An idea for a feature/improvement

Comments

@Zac0511
Copy link
Contributor

Zac0511 commented Feb 3, 2025

I thought it would be useful to have a Puter.js function that returns the user's UI language.

This could allow apps that support multi-language to automatically set their language to the same one the user set for Puter's UI.

This could be added in Puter.js as 2 things :

  • puter.language : works just like puter.env, simply returns the language code like en or fr
  • puter.ui.fetchLanguage() : could show more advanced info on the user's language, including code (ex : fr), name (ex : Français) and english name (ex : French).

The functions above are only examples and idk if they should be implemented like that or in another way.

@Zac0511 Zac0511 added the idea An idea for a feature/improvement label Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea An idea for a feature/improvement
Projects
None yet
Development

No branches or pull requests

1 participant