How to implement a multi language website?

This is the right place to report general bugs, make suggestions or ask for help.
Post Reply
dio
Posts: 3
Joined: Sun Jan 03, 2021 3:25 pm

How to implement a multi language website?

Post by dio » Sat Jun 19, 2021 11:36 am

Hello,

I would like to discuss and to get get your advise if and how it is possible to create a multi language website.

One solution is to create for each language a own sub folder and to install in the sub folder a separate flatpress.

Maybe there is an other solution how to implement a multi language website?



Thank you

NorfolkGreg
Posts: 26
Joined: Wed Dec 30, 2020 9:58 pm

Re: How to implement a multi language website?

Post by NorfolkGreg » Wed Jul 07, 2021 3:46 pm

I'm not sure this is the right forum to discuss your question as it is not specific to FlatPress.

In any case, when I launch the blog of FlatPress's driving force: https://fahrrad.arvidzimmermann.de/ in Chrome it immediately prompts me to see if I want to read it in English. The translation is not perfect but certainly adequate to understand the general thrust of the story.

You need to have an extremely niche readership to require a human written translation these days.

User avatar
Arvid
FlatPress Coder
Posts: 555
Joined: Sat Jan 26, 2019 7:40 pm
Contact:

Re: How to implement a multi language website?

Post by Arvid » Sat Jul 10, 2021 12:04 pm

Hi,

this is a very interesting topic. Two of my three ideas were mentioned already:

Let the reader use own tools (browser) or services (Google Translate) to translate.
Pro: Nothing to do for you, just write in your preferred language.
Con: Readers unaware of tools and services will not be able to read your blog. (Solution: You might simply recommend these to your readers.)

Maintain a dedicated blog instance for each desired language.
Check out flatpress.org / flatpress.de :)
Pro: Contents may vary as well, depending on the different interests of your readers. Also: Easy to set up with multiple FlatPress instances.
Con: Double the work: New content, changes to the FlatPress theme, new plugins, FlatPress updates - everything must be done in every instance.

And as for my third idea:
A FlatPress plugin might do the trick.
I once did that for moziloCMS, the flat-file CMS I wrote many years ago. The plugin (called "i18n") basically works like this: You write your content in different language tags (but on one page!), and the plugin only displays the content of the language the visitor chose. This could look like this:

Code: Select all

Oh, {i18n|de|hallo Welt!}{i18n|en|hello World!}
German readers would see "Oh, hallo Welt", whereas English ones read "Oh, hello World!".
But the fun is just starting there: You might want to translate not only the entry's content, but also its title. And what about the menus, the sitemap, the search results? These are all generated by the FlatPress engine, and the plugin would have to overwrite this default output. And, what my moziloCMS plugin does, you'd need to write a cookie to store the desired language on your visitor's computer to make sure that the blog is displayed in his desired language not only once, but after every click he does. And so on ... ;)
The moziloCMS i18n plugin is actually being used on my website. Check the "Mix2Stix" section for example to see how it changes the output - the little flag icons in the header will let you chose the language.



All the best,
Arvid
πŸ“ Project blogβ€ƒβ€ƒπŸ“– Docsβ€ƒβ€ƒπŸ¦ Twitterβ€ƒβ€ƒπŸ˜ Mastodonβ€ƒβ€ƒπŸ“œ Forum RSS feedβ€ƒβ€ƒπŸ“œ Project blog RSS feed  ❀️ Donate


Save the date: FlatPress Community Meetup in πŸ‡©πŸ‡ͺ Berlin on March 23rd! Announcement, Forum Topic

πŸ”₯ How to rework your themes and plugins for FlatPress 1.3 / Smarty 4 πŸ”₯

NorfolkGreg
Posts: 26
Joined: Wed Dec 30, 2020 9:58 pm

Re: How to implement a multi language website?

Post by NorfolkGreg » Wed Jul 14, 2021 2:24 pm

Arvid wrote: ↑Sat Jul 10, 2021 12:04 pm A FlatPress plugin might do the trick.
You write your content in different language tags (but on one page!), and the plugin only displays the content of the language the visitor chose.
I should have thought of that!

Using just HTML and CSS it's easy enough to click on a link/button that will determine what classes of content will be displayed. Many FAQ and similar question/answer pages use the technique to reveal appropriate content.

User avatar
Arvid
FlatPress Coder
Posts: 555
Joined: Sat Jan 26, 2019 7:40 pm
Contact:

Re: How to implement a multi language website?

Post by Arvid » Sun Aug 29, 2021 10:19 am

NorfolkGreg wrote: ↑Wed Jul 14, 2021 2:24 pmUsing just HTML and CSS it's easy enough to click on a link/button that will determine what classes of content will be displayed. Many FAQ and similar question/answer pages use the technique to reveal appropriate content.
This is very clever :lol:
Not sure if this could cause SEO problems, though - do the crawlers understand that the "invisible" parts of the content shouldn't be indexed?
πŸ“ Project blogβ€ƒβ€ƒπŸ“– Docsβ€ƒβ€ƒπŸ¦ Twitterβ€ƒβ€ƒπŸ˜ Mastodonβ€ƒβ€ƒπŸ“œ Forum RSS feedβ€ƒβ€ƒπŸ“œ Project blog RSS feed  ❀️ Donate


Save the date: FlatPress Community Meetup in πŸ‡©πŸ‡ͺ Berlin on March 23rd! Announcement, Forum Topic

πŸ”₯ How to rework your themes and plugins for FlatPress 1.3 / Smarty 4 πŸ”₯

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests