We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Multilingual sites with Plone

00:00

Formal Metadata

Title
Multilingual sites with Plone
Title of Series
Number of Parts
39
Author
Contributors
License
CC Attribution 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Plone Conference 2013 and Palestras da 9ª Conferência Brasileira de Python (PythonBrasil[9]) - Brasília / Brasil
Plane (geometry)WebsiteXMLLecture/Conference
Plane (geometry)Annulus (mathematics)Software developerTranslation (relic)Content (media)Web pageLaptopDifferent (Kate Ryan album)Formal languageWebsiteShared memoryMedical imagingIndependence (probability theory)Field (computer science)Line (geometry)TelecommunicationLecture/Conference
Web pageDependent and independent variablesLecture/Conference
Plug-in (computing)Type theoryTranslation (relic)Formal languageCASE <Informatik>Content (media)GoogolService (economics)Interface (computing)Computer iconObject (grammar)Computer virusField (computer science)Multiplication signFlagMaschinelle ÜbersetzungProjective planeWeb 2.0Independence (probability theory)Category of beingMechanism designProfil (magazine)Lecture/Conference
BitWebsiteInterface (computing)Lecture/Conference
Text editorDecision theoryDifferent (Kate Ryan album)WebsiteFormal languageLecture/Conference
Canonical ensembleDifferent (Kate Ryan album)Content (media)Object (grammar)Level (video gaming)Disk read-and-write headFormal languageOrder (biology)MultiplicationWebsiteBitIndependence (probability theory)Translation (relic)CASE <Informatik>Type theoryField (computer science)Revision controlUniform resource locatorDefault (computer science)Attribute grammarTheory of relativityComputer configurationMobile appLecture/Conference
Translation (relic)Content (media)Field (computer science)Human migrationDecision theory1 (number)Electronic mailing listFormal languageObject (grammar)MereologyPattern languageProduct (business)CodeRight angleCASE <Informatik>Subject indexingDemo (music)ImplementationWebsiteLecture/Conference
Lecture/Conference
Default (computer science)Demo (music)WebsiteLecture/Conference
Type theoryWebsiteContent (media)Lecture/Conference
Content (media)Formal languageRootType theoryGame controllerDefault (computer science)Web pageDifferent (Kate Ryan album)Table (information)Demo (music)Physical systemCASE <Informatik>Configuration spaceMobile appInstallation artTranslation (relic)WebsiteLecture/Conference
Medical imagingInformationTranslation (relic)HookingFormal languageRootContent (media)Object (grammar)Web pageType theoryTraverse (surveying)Digital photographyRevision controlCASE <Informatik>Lecture/Conference
Revision controlMedical imagingLecture/ConferenceComputer animation
Formal languageWebsiteGUI widgetDefault (computer science)Lecture/Conference
Translation (relic)Software frameworkRootField (computer science)GUI widgetObject (grammar)Point (geometry)Network topologyPhysical systemUsabilityCASE <Informatik>Formal languageContent (media)Theory of relativityDifferent (Kate Ryan album)CodeMessage passingView (database)CodeLine (geometry)Order (biology)AliasingLecture/Conference
Translation (relic)Computer configurationGreatest elementComputer fileLocal ringService (economics)Software maintenanceMathematicsLecture/Conference
Transcript: English(auto-generated)
So welcome again to the every year multilingual talk. I just changed two or three slides. Oh, no, sorry.
The approach of this year is really different. Instead of talking about Plone EPP Multilingual, we are going to talk about multilingual sites in Plone. That's really different. So we are going to talk about Plone EPP Multilingual. That's the question. So here's who we are. I'm Ramon Navarro, Plone Developer since 2004.
I'm a member of the Plone team. I work as Plone Developer at Discord.cat. And she's Laura Perez-Mayos, also Plone Developer since 2007, and Plone Developer also at the same company as me. And I've been responsible of the multilingual solution
on Plone since, I don't know, maybe six or seven years ago. So we are going to talk about the multilingual problem, or why doesn't not everybody speak Catalan. It will be much easier, and we'll ask problems. So how many people has multilingual sites here? OK, and how many of you are from USA or UK?
Oh, great. So there are a lot of languages. And we can see on the laptop of Mico that we speak a lot of languages. And we have a lot of communication problems. You can see I'm doing the lines.
So what's happening is that we need some kind of solution on the CMSs. Sorry, this is not moving. So we need to solve the problem on CMSs. So what we need to do is to translate the page on your site.
So it's available in different languages. But this simple problem brings with you a lot of other consequences. That needs to be solved. For example, language independent fields, or image fields. We need to copy the image to all the different translations. We need to have shared content. Shared content means that maybe you
have some kind of manual that's in English and in Spanish, and you want to share on your web page. And besides that, we have small companies, small sites, that they don't want to translate all the pages. They only want to translate some pages. So they want to share the content between all the different languages. And more problems are language follow-ups.
OK, what happens when we try to access some kind of content that's not being translated to the language we want? OK, keeping translation up to date. That means that if anybody modifies some kind of object, they need to be notified that the translations need to be updated also.
So multilingual is one of the hardest problems. I think it's on the web pages. And nobody wants to talk about that. Nobody wants to take care about that. Everybody wants to buy it, working on that. So I also want to buy it. If anybody wants to take the responsibility of that,
I'm really welcome to that. But we tried to find our best solution. So what we did is just try to check what our competitors does and try to get all that's great from them and just try to get them blown. So this talk is about that.
So we are going to see what our competitors do. And we are going to see how blown does the same. OK, so now it's your time. Hello. So when we have to face the multilingual problem,
we have two different problems, how to translate the interface and how to translate the content. For translating the interface, it's pretty easy. You just have to use language files, like profiles or property files.
And you have it. But then for the content, you have to think if you want to translate just fields or the content. And it depends on what kind of project you are going to use. So let's take a look at what are our competitors doing.
The Drupal guys, they have really good solution, I think. It's they allow the content to translate content and also translate entities that it's our objects and fields in blown.
And you can actually configure each method for every kind of content type, so it's pretty useful. They also have really two nice features. It's to track your translations. A common problem is that when you create a content,
you have to translate, but usually you are not the guy who is going to translate it. So you need to flag it as, OK, somebody has to translate this content. Also, you have another kind of problem that you change something, and you need the other translations to be marked as outdated. So they have two nice checkboxes to do that.
They also allow side-by-side translation, and you can use some kind of Google translation plugin in case you want to have basic translation. On the other hand, they don't allow language fallback. You just fall back to it's just
available for the interface, not for the content. And they don't allow language independent fields, so if you want to use some pictures and everything, you have to put it in every translation you do, so it's not pretty useful. Then we take a look at WordPress.
They also allow to translate content type taxonomies, that it's a kind of categories in Plone. And also custom fields, they have some mechanism to track translations, just kind of workflow.
So you can mark the objects as waiting for a translator, being translating, or complete. And they also have a really nice feature. It's professional translation services. They have a kind of connector with icon localized services. It's professional translation services,
so you can actually hire a translator for translating your content. And you manage to pay through the web and everything, so it's pretty nice. But it's pretty strange. They don't allow side-by-side translation. So when you are translating some content,
you don't have the original. Maybe you can start by copying it, but it's not the same as seeing it. And then they don't allow language fallback, so if it's not there, it's not there. We also took a look at LiveRay. It's not pretty good.
They just allow field translation. They don't talk about objects or notes or anything. They have some kind of automatic translation. I couldn't manage to know if it's with Google Translate or I don't know what kind of plugin they are using. So you have no content translation. You have no way to track your translation workflow.
You have no side-by-side translation, so it's pretty basic, and it's not really useful. So we put all this data in a kind of table, so you can see that maybe Drupal and WordPress
have kind of nice solutions. LiveRay is not so good for multilingual sites. But then we try to use them, and they are not really usable. They have not good interfaces. It's all hard to find and hard to use. So let's see how Plone is doing this.
Please. Okay, so all of them sucks, and Plone really rocks, so. Yeah, that's a conclusion. That's a conclusion. So we are going to talk about now a bit about Plone. That's why we are here.
So the multilingual story in Plone started in 2004 when Geir just pushed LingoPlone. I know that everybody hates LingoPlone, but has been there. It's been really great software. There's a lot of magic. It's been there since 2004, so it's really great, and everybody uses that, has been using that.
The only problem is that only supports R types, and some of the magic and some of the decisions on the design has bring us a lot of problems. If you use LingoPlone, it's easy that you finish having a site with different languages, content languages on the same folder.
It's really a mess. You get a mess, the editors hate you, and it's really bad. In 2009, we had Raptor's multilingual field, multilanguage field. Their approach is really different. Instead of translating content, what they want to translate is fields. So, okay, you have your content type,
and you only want to translate this field. It's really a different approach. It's easy to have a canonical object because it's the one object, and then you only translate the fields. Has a lot of problems. You have no REST URLs, so you cannot give a URL that's going to give you that language. So it's really with some attributes on the URL, yes,
but without know, and it's also for R types right now, and it's a bit, the implementation, it's a bit hard to understand. We have collected multilingual that Malte did one year and a half. There is no release still,
so I don't know if it's going to release someday. It's a really simple way to deal with multilingual problem in the same way as LingoPlone was doing, but with only dexterity, no support for R types, no UI, no usability, but it's really thin,
and there has been no release and no comments, I think, since one year or something like that. And finally, PloneApp Multilingual that we released in 2011, and now we are in version 1.2, stable, really in a lot of sites in production, and we are going to talk a bit about what it offers to you.
In order to talk about that, first we need to think about what Plone is, which is the relation with Plone and Multilingual. So if you install Plone out of the box, you have the option to have one language, you can define the default language, and you can define the multiple language
only for the UI translation. So you have the language selector, you can switch between the languages, and what's changing you is the UI, the profiles, the things that are translated in the code, but you cannot translate code, content, sorry. Then we have multiple languages,
and in order to explain how Multilingual solved this problem, we need to have in our head two different kinds of content. One kind of content is the one that's shared documents. These shared documents are documents that there is only one on all the Plone site, and you see that object on all the languages,
you may be able to translate some fields for the different languages, and you have Fallback included because it's one object, so you always get the object in the language that you want or at least if it's translated, it's field. And the document in a language, that's the document that has been translated
to the language that you really want to see. In this case, we have language independence fields, and we can translate this object to another object. In order to explain this really nice graphic, so we have shared content, in this case it's two documents,
and we have document two that's been translated to the other language, so what we see in language one is the two objects that are in our language and the shared content also there. And on language two, we have the two objects we have here and the two objects over there. So having in mind these two kinds of documents
that we normally have in multilingual solutions, we saw in the other, in our competitors, some of them solve only one of these documents, the others, both of them. Plone APP Multilingual, 1.x for Plone 4.x, implements language independent fields.
That means that with R types or dexterity, you can define which fields are independent, and when you create the translation, the fields are copied there. We have shared content, in this case in multilingual one, it's fake shared content. It's really implemented in a really fast way,
and it's not completely working for all the use cases, but it at least does the feature. We have a translation map that's really useful for editors, where they can see which content has not been translated to some languages, and you can see the map of all the languages.
Side-by-side translation, Google translation integration, so you can say, okay, I want that Google translates this field, and it's translating you to the other side of the side-by-side translation. We have translation of content types, of R types, on dexterity. You can translate that on the fly, or just by code,
or not on the fly, whatever you want. On the fly means that it's not creating the object until the translation is finished, so it's not there, if you don't save the translation. We have lingo-plone migration. That has been the worst part of all the code. You can have a side with lingo-plone.
I can assure that it's working. I cannot assure that it's working. There are a lot of use cases that's impossible to maintain, and it's possible to have the solution for everybody, but at least does the deal with a standard plone with lingo-plone, so if you want to migrate to Plonepp multi-lingual, it's possible.
And we have fallbacks, so you can, in case that the object is not translated, you go to the closest one. That means the object, if your pattern has been translated, so the pattern, or the closest one we found on our tree, or a list of possible translations that are there for that object.
Okay, that's Plone, not one. It's been there since one and a half, it works. It's really in production. But Plonepp multi-lingual, too, it's going to be for Plone 5. Right now, it's possible to use that on Plone 4. And we just changed some of the decisions
we made on our first version. We have language-independent fields and our types and dexterity. We have real shared content. That's really the main feature. So you can have objects that are only ones on the database, on the ZODB, and you can see them on all the different languages,
and you can just move, order, or whatever you want. Side-by-side translation, Google translation, translation of IT content types, or index data content types, and also fields, fields for the shared content. And language fallback, because we have translation of fields, translation map, and translation workflow.
Some of these features are still being developed, so what we really have now is the real shared content and initial implementation of the fields translation for shared content. And as talking about all these features is really great, we will try to do some real demo
about all this kind of stuff, so everybody sees how we should do a multi-lingual site on Plone.
So we have a Plone site. This is a 4.3 with PAM 2.0 that's being in development. We are going to create a Plone site.
We need to check to install dexterity,
because we just prepared for Plone 5 and Plone 3. We don't have dexterity installed by default. Demo.
I'm sure we tried five times yesterday, and it was working, so.
Timo, did you make some comment to content types? Maybe that's a problem, no?
Somebody made a comment that removed my comments, so we will try again. If there is any question, while we try to make that work?
Okay, yeah. Okay. So we have a Plone site that just installed. We are going to migrate from R types to dexterity.
We'll just migrate it to dexterity content types. We are going to add some kind of dexterity type
on the Plone site. So we are going to create some kind of page. Okay, now we are going to install Plone APP multi-lingual.
You can see here that there is also R types multi-lingual if you want to still support R types. Okay. So now we need to set the behaviors on content types,
because right now content types doesn't have a translate table by default configured. So we are going to configure the behavior on the Plone APP content types. That all of this is going to be solved on Plone 5 by default, but for doing the demo we needed to.
So now we just defined the behaviors on the dexterity. We are going to go to the Plone multi-lingual control panel to define our languages. So we are going to add English to this.
Okay. Okay, so now when we set the different languages on the control panel, they just created the different language root folders, the CA and the N. So if we go to the root, we are going to go
to the one that we have on the cookie, that's English. And you can see here that there are all the content that was on the root of the system. So we have the welcome page, the news, the events, the users, and the page that we just created using dexterity. If we switch to another language, we switch to Catalan, for example, we will see the same content that's there.
And we're going to go to English, and we're going to create some English page. Now this page is going to be really in English because we are in the English folder, so it's going to be English page.
Okay, now if we go to the root of English, okay, and we see the contents. Yeah. What wasn't possible in multilingual one was to reorder the shared content,
because it was fake, in this case it's real. So we are going to really reorganize this, so we are going to be able to see that the page has been reordered. And we are going to go to,
yeah, okay, we are going to go to this page we just created, end page. And the fallback in this case, it's decided to be the closest one, so if we go to Catalan, we are going to go to the CA folder, that's the closest one we have in Catalan, that's the language root folder in Catalan.
So we are going to switch again to English, and we are going to translate this end page to Catalan. So we have this side-by-side form, you can choose which language do you want to see on the left, so you see the information on the left.
If you go up, one moment, yeah. This warning here, it just says that this object is going to be a translation of another object, in case that you don't want to make that the translation of another object, you should press here, because it's using an adapter, traversal adapter that's called a translation. If you go down, and we save.
Okay, we are now in the Catalan, we switch to English, they are linked, so we see each other one. So now we are going to see, these are the documents that are in different languages, so we can just have different content for each document.
If you go to the shared folder now, we see all the content that's being shared to all the other languages, that's the root of the Plone file, on the Plone site, and we are going to create, yeah, we create a page here,
so we just created this page in the shared folder, if you go to the root of the CA, we see that the page is already there, and we switch to another language, the page is also there.
And now what happens if we have a shared page, and we want to make them from one language, so in this case, for example, page two is something that's being shared, doesn't have language, because it's on all the content, and we want to set for this page,
that's okay, it's not going to be more shared, it's going to be English, we can set that. So it's going to be English, for example. And now this page, it's on English, so if we switch to Catalan, we are not seeing the page, because it's only real content on the different languages.
Okay, and we are going to try something really hard, that's we are going to create an image, in this case, we just hook the content types to make the image feel from the image language independent, so we are going to
just add the photograph here, we save, see the photograph, sorry. And we can translate that to English, okay, go down, just save it.
So we see that in English we have the same image, and we can edit now the English version or the Catalan version, doesn't matter, every version that we just change the image here, in the other version is going to be applied.
Okay, so now we have a different image, and we can switch the language, and we see that in Catalan is the same. Okay, so I think that was nearly, yeah, we can switch again to that.
So this was the demo, I've already worked it. And my idea was just to have more questions, I really want to thank, do we have 31 contributors to Plon EPP Multilingual? There are a lot of people that it's being involved with the development, we have more than
Plon EPP Widgets coverage, we have 72%, so. So it's a really stable product, we are using that on a lot of sites, because at least in my country, all the sites needs to be in two languages,
so we have no Plon sites with only one language. And if there is questions, yeah. The PliPis has been there for a long time, we're just been talking during the Plon conference to accept the PliP, it's going to be in the core, but it's not going to be installed by default.
So it's going to be an add-on that's being bundled with the rest of Plon 5, just because it's something that is really being used in a lot of places, and it would be really great to adapt some kind of Plon EPP 18n to be more compatible with that Plon EPP Multilingual.
Just because the control panel and the selector and some other small things on Plon EPP 18n are really all and should be adapted to be more powerful with this solution. There is a small JavaScript of maybe 50 lines
or 70 lines for the side-by-side translation that will need to be integrated with Plon EPP Widgets. I think that there is no test. Yeah, yeah, that would be really great.
Well, the problem is that it's really linked to the language, to the language codes right now,
but all the code that we do for doing the shared content, it was based to the collective dot alias that Martin wrote some long time ago, so we removed all the hacky things that he did there, and we're just talking with him about which is the best solution, we just copied what's on the root of the system
to the language root folder. The idea, you can copy them. The problem is that it's really linked to languages.
It will be really easy. Yeah, yeah, it will be really easy, just I'm linked to the languages that we have there just to create, to check that it's a language root folder and all this kind of stuff, but adapting that will be really easy.
More questions? Just we try to make something usable. That's really hard in multilingual.
We tried to just, Lingoplum could not go on with dexterity,
so we needed another solution, and the usability point, from the usability point of view, our competitors are really bad, which we tried all the possible, so and we tried to just find a solution that's really easy for the editor, and you don't need to break your mind about,
oh, where is this content, or... Translation map, I cannot show you
because I break on this 2.0 version, but it has two views. One is a tree, using some kind of JavaScript framework that just shows you a tree of all the root and different translations, and you just can pick to the content
and see which translations you have, which are missing. You can create them through Ling, and you have the other view that's all the content that you have in case that you need mirror sites, so on all the languages, you have all the content translated. It says, okay, this content is not translated to that language, this content is not translated,
so you can have a review of all this. Translating tags, yeah.
On dexterity, it works really great, because at least if you have a tag as a vocabulary that you have translation for the tag, we're using the message tool,
then if you have that on your vocabulary in order to make the tags, the relation field automatically gets the translation, so in case that you have a language-independent field on dexterity, and you translate the content, and the related object has a translation
to that same content, it's taking care that the related object is the translation of that object. We are working on that.
It's on this list, the translation workflow, that's on the bottom of it. We really think that's something that we really need on Plone for translators, but we are still working. If anybody wants to work on any of these features, just we are going to sprint on it.
You mean with xleaf or something like that, or?
Oh, you mean the PO files and all the translation files? No, there was a project. Malte just started that, I think, five or six years ago to make that. We couldn't find an easy solution,
a fast solution to maintain that, but I think that at least with Plone 5, if we remove some of the stack that we have for A8 and N folders and language, because we have two methods to maintain PO files right now, if we reduce this amount of possibilities
to locales and it will be easier, because we had a really big problem with A8 and N folders to get the PO files from there.
Yeah, but as we are using place-less translation services on some cases, we still can try to do that if we want, besides the changes of Kano.
There is an option to make that, but we will need to wait until Plone 5 is up there to reduce the amount of dependencies that we have now for that features. Any other questions? So thank you very much.