Apostrophe CMS Main Site Forum Home

Multilanguage site

Hi Tom and everyone, we used Apostrophe because of it’s great user experience on a smaller, single language, site late last year.

We would love to use it on a bigger project that requires a multi-language setup. I searched the old Google Groups did not get a definite answer whether that would be possible or not.

Could you tell us if it is possible to create multilanguage sites with Apostrophe or if it would be feasible for us to create that functionality for it and open source our solution?

I found this at https://groups.google.com/forum/#!msg/apostrophenow/OvxsE3u21D4/-hYrb5rTB6UJ;context-place=msg/apostrophenow/_48ZI3uovvo/5k1k0xBHMacJ

One approach, of course, is just to have “subdirectories” of the site,
separately built out for each language, taking advantage of shared
media that doesn’t have a textual element but otherwise independent.
That can be done already, but you’ve indicated you don’t want to go
that road.

Another approach is for each page to have versions in various
languages. This is not something that has been built so far.

In Apostrophe 1.5, every page, blog post, event, etc. could be
translated into multiple languages, although the URLs were always in
the default language. Some folks told us they didn’t actually like
this when it comes to blog posts and events, although they found it
useful with regard to pages.

Hi! Yes, it’s certainly feasible.

Take a look at the old apostrophe-localization module (for 0.5):

That module works by adding middleware and extending various methods deep in 0.5’s model layer. We would follow the same general idea, but patching the 2.x model rather than the 0.5 one.

That can probably be achieved best by writing a module that uses the “improve” feature to enhance apostrophe-docs, in the same way that apostrophe-pieces-import uses “improve” to enhance apostrophe-pieces. This should guarantee your extensions of the insert and update methods are called early enough.

You would probably also want to extend apostrophe-cursor, in order to ensure that the content for the current locale gets “swapped into” the properties where vanilla Apostrophe code expects to see it at read time.

Certainly this would take some doing. You could pursue it yourself, or you could arrange for us to do it via Apostrophe Enterprise Support, perhaps in coalition with other interested parties:

http://apostrophecms.org/support/enterprise-support.html

Will we do it on our own? Eventually, if our clients need it. But we’ve had few clients who required it so far; it took quite a while for a client to prioritize this for us with 0.5.

Let me know your thoughts!

Hi,
Did you at the end adapt/create the localization plugin?
thnx

Hi Freeyland,

For Apostrophe 2.x the apostrophe-workflow plugin now addresses both localization and approvals. It’s a powerful and flexible solution that allows for things like updating only the widgets that have actually changed in the “master” version of the site rather than forcing a re-translation of the whole thing or manually tracking down the differences. Check it out!

Hi,
Workflow especially for small websites are too complicated. Is any alternative way to implement multi language support?

Also, how may I control order of languages in language switcher. I’m following a tutorial but order on the front is different than in JSON configuration.

Presently the workflow module is the only supported option. At some point we might implement a localization-only mode that retains full compatibility by using locales properly for storage, as workflow normally does, but without the draft/live distinction. It does mean losing a lot of functionality though. It’s difficult to imagine going back to live, visible-to-the-customer editing of content that is initially copied in the “wrong” language. I admit I have a bit of a mental block when I think about it, but I suppose if the scontent is mostly created before launch it’s not that big of a deal.

As for ordering the languages in the language switcher, that’s an interesting point and probably worth opening a ticket about or making a contribution.

Hi @lasharela, we use apostrophe-workflow to power our 165 live Apostrophe websites (I’m part of MICHELIN group digital factory in France and ApostropheCMS is our core CMS solution). We have websites of all sizes, whether big or small. Back in 2017, before apostrophe-workflow existed, we had built an Apostrophe bridge with https://localizejs.com, a localization 3rd-party solution.

Hope this helps!
Etienne

I agree Apostrophe is the best, but had this Multi-language issue, and finally after some help from a web application development company, this issue got resolved. Anyway thanks guys