How to create Multilanguage Posts?

Hello!

I read on your announcement that with Ghost 2, multilanguage posts are possible.
I checked the docs already but found nothing related to this.

Can you give some more informations how to build a blog with posts in two languages for example?

Thanks for any help in advance!
Tim

Sure thing:
https://help.ghost.org/article/112-multi-language-content

1 Like

Ahh. Looked only on the admin docs, not at the end user docs.
Thanks @John! :metal:

Excited about Ghost 2.0!

Is it possible to link multi-language posts with each other?

If I understand correctly, using the dynamic routing approach, posts can be tagged for a specific language and that alters the URL so we can publish blog with posts for each language.

However, imagine I have the same article, but translated in multiple languages, e.g.

  • Post about X (in DE)
  • Post about X (in EN)
  • Post about X (in FR)

How do I tell Ghost these posts are about the same subject but just localized in different languages? is that part of this multi-language feature support? that would allow for a language picker to be displayed in the theme and for users visiting the blog post to be able and switch content to their language of choice (post could be linked in the admin console as well).

Thanks in advance.

1 Like

You can, but at the moment it’s manual. You would need to add hreflang tags via code injection :slight_smile: you could then potentially build UI off that using JS.

Generally, this is a secondary use-case which we haven’t fully addressed yet - but we’re definitely thinking about it.

Ha! Using hreflang is a good and proper idea for this. The code injection and JS on top is a bit less easy to implement quickly but could indeed work in the interim :slight_smile:

I am very glad to know you are thinking about this, it would be nice to have it in the admin UI, your 2.0 announcement included a small graphic that made me think about this feature:
multi

Maybe in the future this could be a setting in the Admin UI where you can choose different language for the same post.

Thanks again.

3 Likes

+1 for the hreflang idea :slight_smile:

i’ve been trying following the guide at https://help.ghost.org/article/112-multi-language-content, but i always get the error: “Please select a valid YAML file to import.” when i try to upload my new version of the routes:

routes:

collections:
  /:
    permalink: /{slug}/
    template:
      - index
    filter: 'tag:-fi'

  /fi/:
    permalink: /fi/{slug}/
    filter: 'tag:fi'

taxonomies:
  tag: /tag/{slug}/
  author: /author/{slug}/

I tried out a lot of different versions: removing the - filter, removing the index… can’t find anything that would work. I wonder could it be a permission problem anywhere on my server? thanks for helping me! :)

1 Like

Which browser? Have you tried a different one?

thanks Kate…

i tested out FF, Chromium and Chrome… running on Linux Ubuntu 18.04. was thinking maybe there’s a spacing problem on the file or so? Would you have a working routes.yml for me?

thanks

fede

It sounds like a content type is missing.

how should i debug this? in the error log all i could see was something pretty close to the displayed error message…

thanks for helping me out! :slight_smile:

Is your file called routes.yaml? It has to be exactly this. Not routes.yml or any other derivative.

yep that is the name of the file i’m trying with :slight_smile:

The default file can be found here: https://github.com/TryGhost/Ghost/blob/master/core/server/services/settings/default-routes.yaml if you rename it and try to upload it, it should work.

If it doesn’t work then it is likely a problem with linux missing a content type for yaml, as Kate suggested.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.