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

Translated categories aren't showing in Graphql #34

Open
aaron-shop12 opened this issue Apr 15, 2022 · 6 comments
Open

Translated categories aren't showing in Graphql #34

aaron-shop12 opened this issue Apr 15, 2022 · 6 comments

Comments

@aaron-shop12
Copy link

I can't see the translated categories in the GraphQL. The below only shows the 3 categories in the default language - and not the translated categories.

Similar issue happened with my menus - if you go into a translated menu and then save it, it will then remove all translated menus from the graphql.

query MyQuery {
terms(where: {taxonomies: CATEGORY}) {
edges {
node {
id
link
name
... on Category {
id
name
}
taxonomyName
uri
}
}
}
}

@MrZyr0
Copy link

MrZyr0 commented Aug 4, 2022

I've the same problem while querying my posts. All terms (categories and tags) refer to the original instead of the translated version

@rburgst
Copy link
Owner

rburgst commented Aug 18, 2022

@MrZyr0 this appears to be a different problem from the original one stated by the OP

@rburgst
Copy link
Owner

rburgst commented Aug 18, 2022

@aaron-shop12 I havent researched into categories at all here as my use case did not require it. Since fixing issues like this take substantial amount of time (at least for me), I dont really have the bandwidth to investigate this.
I am happy to accept PRs however.

@MrZyr0
Copy link

MrZyr0 commented Aug 18, 2022

@MrZyr0 this appears to be a different problem from the original one stated by the OP

Ok, in the meantime I have fork the project and add a new field localizedTags to be able to get tags in the same language as the post. I hope to find the time to propose a PR.
In the meantime you can see what I did here

@eliawk
Copy link

eliawk commented Sep 29, 2022

@MrZyr0 do you know how to get also the translated terms in the query above?

@MrZyr0
Copy link

MrZyr0 commented Oct 22, 2022

As I said, I've added a new field called localizedTags in my fork to be able to get tags translated.

Another way to get tags is by use terms property like this :

terms {
    nodes {
      ... on Tag {
        id
        name
        slug
      }
    }
  }

This works fine for us.

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

4 participants