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

How to get current language in astro-i18next? #180

Open
dev3h opened this issue Oct 5, 2023 · 2 comments
Open

How to get current language in astro-i18next? #180

dev3h opened this issue Oct 5, 2023 · 2 comments

Comments

@dev3h
Copy link

dev3h commented Oct 5, 2023

I am creating a blog with astro and I stuck with how to get current language in astro-i18next, anyone has solution?

@dev3h dev3h changed the title How to get current language in astro-i18next How to get current language in astro-i18next? Oct 5, 2023
@timwehrle
Copy link

timwehrle commented Oct 7, 2023

I guess you just use this <html lang={i18next.language}>. You can see the example here: Astro-i18next This will work with the SelectLanguage component.

@dev3h
Copy link
Author

dev3h commented Oct 7, 2023

thanks bro, before I think that how to generate a post write in markdown when I run command in terminal, but I see that it only generate multiply language for astro file, and I think that I write a post with a language and translate this to another language though

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