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

Set the displayed language with a URL query parameter #1566

Closed
CarlSinclair opened this issue Jul 21, 2024 · 5 comments
Closed

Set the displayed language with a URL query parameter #1566

CarlSinclair opened this issue Jul 21, 2024 · 5 comments

Comments

@CarlSinclair
Copy link

CarlSinclair commented Jul 21, 2024

Is it possible to localize the booking widget using a language parameter in the URL? That would make it easy to make the iframe match the language of the parent page. If not, is there another way to do this currently without having users manually select translations? Or having the translation button get clicked automatically based on the language/URL of the parent page? Because as far as I can tell, the language selection is done using JS and not via URI.

@alextselegidis
Copy link
Owner

Hello!

Thanks for posting your question.

We will be adding this in the next release.

Currently this is not possible, but you should be able to change the language with a GET parameter.

Alex Tselegidis, Easy!Appointments Creator
Need a customization? Get a free quote!

@alextselegidis alextselegidis changed the title URL language parameter Set the displayed language with a URL query parameter Jul 22, 2024
@CarlSinclair
Copy link
Author

image

It seems the language files aren't publicly accessible, not at the requested URL language/**/translations_lang.php or at the correct URL application/language/**/translations_lang.php.

Is this simply a matter of surfacing this file (likely by overriding rewrite rules) or is it more complex than that?

@alextselegidis
Copy link
Owner

Hello!

Can you try with "?language=spanish"?

Alex Tselegidis, Easy!Appointments Creator
Need a customization? Get a free quote!

@CarlSinclair
Copy link
Author

That's working perfectly! Thank you! I was trying with language codes like es. I never thought to use the full language name.

@CarlSinclair
Copy link
Author

Note that it's only working when appended to the root domain. Appending it to index.php or ?embed doesn't work. Embed never did anything for me though so it's all good.

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