-
-
Notifications
You must be signed in to change notification settings - Fork 605
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
ContentQuery locale does not work #1737
Comments
Somehow it worked for me by adding the
|
|
7 tasks
7 tasks
@KhaledAlMana Could you check edge-channel to confirm that is solved or not? |
@farnabaz I will check and get back to you. |
@farnabaz Thanks a lot! it works just fine. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
Darwin
v16.18.1
3.0.0
1.0.0
yarn@1.22.19
vite
modules
,runtimeConfig
,ssr
,app
,css
,build
,experimental
,components
,vite
,intlify
,vueuse
,windicss
,content
,openidConnect
nuxt-windicss@2.6.0
,@intlify/nuxt3@0.2.4
,@vueuse/nuxt@9.6.0
,@nuxt/content@2.2.0
,@pinia/nuxt@0.4.6
,nuxt-openid-connect@0.4.2
,unplugin-icons/nuxt
-
Reproduction
Reproduction: https://stackblitz.com/edit/github-jzx7nq
locale property within component does not filter.
locale within where property does not seem to be working as well
Describe the bug
Objective:
I have multilingual posts that I need to filter based on user's language.
Bug:
locale property does not work for other than defaultLocale
Additional context
I cannot seem to find enough info about filtering locale in docs or issues
I tried everything in docs, but things seems to be breaking.
For example:
<template #empty>
<template #not-found>
does not work with ContentQuery, unlike what docs says here
UPDATE 1 [10-DEC-2022]:
The below function is the only working locale filtration
const content = await queryContent(query).locale(locale).findOne();
Logs
No response
The text was updated successfully, but these errors were encountered: