question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Page Name other than english language are not generated

See original GitHub issue

Summary

Relevant information

Environment (if relevant)

File contents (if changed)

gatsby-config.js: N/A package.json: N/A gatsby-node.js: N/A gatsby-browser.js: N/A gatsby-ssr.js: N/A

I have below wordpress pages with page name in 4 different languages:

/تركيا/ /tурция/ /ترکیه/ /turquie/ - Only this page generated, rest of the above pages not generated.

What do I need to do so that gatsby can also generate wordpress pages that contains page name in language/alphabets other than english.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
TylerBarnescommented, Feb 8, 2020

Hi @expatguideturkey , the whole team has been away for the last week or so as we were in LA for Gatsby Days and the Gatsby internal gathering. I just checked out your repo on the plane home, and I was able to fix the problem for you. Luckily the solution is quite simple! https://github.com/TylerBarnes/expat-repro

When you’re creating your pages, you should use decodeURIComponent() to decode those garbage url strings back into nice looking characters 😃

For example, you could use this code to solve the problem and observe the fix in your console:

  allWordpressPage.edges.forEach(edge => {
    if (edge.node.status === "publish") {
	  // original path
      console.log(edge.node.link)
      const path = decodeURIComponent(edge.node.link)
      // decoded/fixed path
      console.log(path)
      createPage({
        path,
        component: slash(pageTemplate),
        context: {
          id: edge.node.id,
          parent: edge.node.wordpress_parent,
          wpId: edge.node.wordpress_id,
        },
      })
    }
  })
Screen Shot 2020-02-08 at 3 38 30 PM

I’m going to close this issue, but please let me know if you need any additional help!

1reaction
ghostcommented, Feb 6, 2020

There is also no plugin here for multilingual on Gatsby website. https://www.gatsbyjs.org/packages/gatsby-plugin-multilingual/

If I click on these links I get below Error: "There’s not a page yet at /t%D1%83%D1%80%D1%86%D0%B8%D1%8F/

Read more comments on GitHub >

github_iconTop Results From Across the Web

Non-English domain naming issues in programming
Although both German and English are not my native languages, code written in anything other than English seems to be bizarre.
Read more >
Create multilingual SharePoint sites, pages, and news
Create pages for the languages you want​​ To do this: Go to the default language page you want to make available in another...
Read more >
How to cite sources written in a different language than English?
Publication name in original language (if possible) [Publication name translated into English]. Volume/issue/page information (according to ...
Read more >
Localized Versions of your Pages | Google Search Central
Learn how you can use a sitemap and other methods to tell Google about all of the different language and regional versions of...
Read more >
268 Creative Business Name Ideas (Curated, Not Generated!)
So in this post, I'll be sharing over 200 business names ideas and examples to help you come up with business names that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found