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

[Feature Request]: Locale activation via URL parameter #48

Closed
waldenn opened this issue Jul 9, 2024 · 3 comments
Closed

[Feature Request]: Locale activation via URL parameter #48

waldenn opened this issue Jul 9, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@waldenn
Copy link

waldenn commented Jul 9, 2024

Problem Description

The locale can not yet be changed using an URL parameter. This prevents me from embedding the chat app in a larger system, which can call the chat app with the right context (language, prompt, etc.).

Solution Description

I would like to embed the chat app in a larger (multi-lingual) application and call the chat app via a language-code (eg. "fr") in its URL. This should then (only?) show the prompts available in that language.

It would also be great to be able to select the active prompt (and optional user prompt) from the URL.

Alternatives Considered

No response

Additional Context

No response

@waldenn waldenn added the enhancement New feature or request label Jul 9, 2024
@Neet-Nestor Neet-Nestor self-assigned this Aug 3, 2024
@Neet-Nestor
Copy link
Collaborator

Feature added in 2a1eaba.

Now, you can use lang=fr query string in URL to specify UI language. Check https://github.com/mlc-ai/web-llm-chat/blob/main/app/locales/index.ts#L25 for all available language options.

@Neet-Nestor
Copy link
Collaborator

Note that language translations are currently not 100% covered. Please feel free to contribute to translation strings if you find any missing ones!

@waldenn
Copy link
Author

waldenn commented Aug 3, 2024

Fanstastic! Thanks! Will look into the locales, once I have a laptop with WebGPU support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants