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

Does nodeByUri + graphql-polylang support getting the frontpage in several languages? #71

Closed
krishaamer opened this issue Mar 1, 2022 · 2 comments

Comments

@krishaamer
Copy link

krishaamer commented Mar 1, 2022

@esamattis terve from Estonia!

I was wondering if nodeByUri + graphql-polylang should be able to retrieve the frontpage for each language if only given a language slug such as /fi or /de ?

I'm currently using PolyLang and PolyLang GraphQL but I'm only able to retrieve the default language and the frontpages in other languages result in null.)

I first asked the wp-graphql team (wp-graphql/wp-graphql#2249) but they are no sure either so probably it's more appropriate to ask here.

Thanks
Kris

@evrenbal
Copy link

evrenbal commented Mar 6, 2022

I have encountered the same problem and looking for a fix.

I appreciate if anyone leads us to a solution.

Thanks in advance

@esamattis
Copy link
Member

esamattis commented Mar 11, 2022

Tere!

I think this is duplicate of #35 (there's also user land fixes)

Once that it solved you should be able to the other front pages as the translations of the frontpage you are asking for

{
  page(id: "/fi", idType:URI) {
    title
    translations  {
      title
    }
  }
}

You could do just id: "/" which works now as well.

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

3 participants