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

🐛 ♻️ trying to fix i18n with ssr #28

Merged
merged 10 commits into from
Oct 19, 2023
Merged

🐛 ♻️ trying to fix i18n with ssr #28

merged 10 commits into from
Oct 19, 2023

Conversation

FabianWilms
Copy link
Member

Description

All efforts trying to get vue i18n to work with vitepress and SSR/vite failed. It either worked locally or during the build, but not both ways.

So in the end I opted for this way: Building my own translator-Composable which should behave in the same way that vue i18n did.

@MrSebastian feel free to give your feedback, too cause I build this upon your MR

Reference

Issues #20

@FabianWilms FabianWilms requested a review from klml October 16, 2023 10:25
# Conflicts:
#	.vitepress/components/TagChip.vue
#	.vitepress/theme/LhmThemeExtension.vue
#	.vitepress/theme/enhancements/i18n/lang/de.ts
#	.vitepress/theme/enhancements/i18n/lang/en.ts
#	.vitepress/theme/index.ts
#	package-lock.json
@FabianWilms FabianWilms mentioned this pull request Oct 17, 2023
Copy link
Member

@MrSebastian MrSebastian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe u can implement the translator as plugin to prevent that it has to be imported every time.

.vitepress/config.mts Outdated Show resolved Hide resolved
.vitepress/components/Translator.ts Show resolved Hide resolved
.vitepress/theme/LhmThemeExtension.vue Outdated Show resolved Hide resolved
.vitepress/components/Translator.ts Outdated Show resolved Hide resolved
.vitepress/theme/enhancements/i18n/lang/en.ts Show resolved Hide resolved
.vitepress/theme/enhancements/i18n/lang/de.ts Show resolved Hide resolved
.vitepress/components/TagChip.vue Show resolved Hide resolved
@FabianWilms
Copy link
Member Author

FabianWilms commented Oct 19, 2023

Maybe u can implement the translator as plugin to prevent that it has to be imported every time.

I will solve this in a new issue, as there are other branches waiting for this i18n feature.

--> #32

Copy link
Member

@MrSebastian MrSebastian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Just a little typo

.vitepress/components/Translator.ts Outdated Show resolved Hide resolved
.vitepress/components/Translator.ts Outdated Show resolved Hide resolved
@FabianWilms FabianWilms merged commit c7073bf into main Oct 19, 2023
1 check passed
@FabianWilms FabianWilms deleted the fix-i18n-ssr branch October 19, 2023 15:20
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

Successfully merging this pull request may close these issues.

3 participants