DrupalCon Prague 2013

Herramientas para crear sitios web multi-idioma con Drupal 8

Gábor Hojtsy  · 

Transcripción

Extracto de la transcripción automática del vídeo realizada por YouTube.

um so multi single is not very easy and I've experienced this a couple of times first hand that Drupal Drupal evens when I got my badges this is a badge from one of my double events this is my account site from one of the last Drupal cons this is the official

program of one of the Drupal cons where I present in multilingual drew blade so so I like to think this as an analogy to where we are coming from where multilingual is an afterthought and we may get it right or we may not get it right and we want to get to

a place where multilingual is a very integral part of our system and we support it as much as possible so this is only one of the many things that happened in Drupal 8 there's been many initiatives and non initiatives in Drupal 8 that improved the system

and there's been very excellent work in services views mobile configuration management etc and I would be the first person to admit that I was freaked out there's a lot of change in Drupal 8 and I even wrote angry emails to some of the other initiative

leads at the start and I got very embarrassed at the end because I thought it's going to fragment our resources is going to be very hard and and we will not achieve either of the goals that we wanted to achieve and I regretted all of that because what

we ended up with is we empowered each other a lot more so you will see through this session that all the changes that the views initiative brought in all the changes that the configuration management initiative brought in a lot of those things that came from

other other places really helped a lot you to make better multilingual sites there they are not the multilingual ish ative but they helped a lot for you to make multilingual sites and I'm presenting this session but reality is there's a lot of people

who contribute to this initiative this is the list of all the people who are contributing to our initiative if you are in the room and you contribute can you please stand up if you comment in on these issues submitted patches you are not standing up the reason

probably for that is there's a coder lunch right behind these curtains where those guys are sitting down and working on those patches so that's why if you count those people we have almost 900 people who contributed to this initiative it is not counted

the same way that juries counts the thousand six hundred people in core we count everybody who commented on issues put reviews in or do any of those things who appeared on issues with comments sorry we are more liberal in how we have we count contributions

we also had a lot of fun so we've had a lot of sprints I ran at different places we had sprints in Barcelona Berkeley Munich that's personal and again we are sprinting right here right now and as I've said behind the curtains here and we also have

been sprinting the previous weekend and we will sprint and the weekend coming this week and we also obviously will spend on Friday as well so you're welcome to join us so we work very hard on this and we already resolved about 540 issues a lot of stuff

so obviously we come a long way but there's a lot more to do we started off with looking at Drupal 7 and what can dribble 7 really do for you in terms of multilingual and the set state of Drupal 7 multilingual is there are some things that are multilingual

but it's mostly not a multilingual system so there is the low calmodulin core which can define your languages and it can try and get download track can Kendall translations that you downloaded and manually imported but that's very painful to manage

those translations so in contribute a module called localization update which automates downloading those translations from the community and imports them for you and so you have less hassle if you have 100 modules and three languages if you don't have

this module you need to manually download 300 files to your desktop and then manually upload 300 files through the web interface to Drupal core and then import them it's very painful otherwise we also have content translation into plus 7 which is great

because it can translate nodes it cannot translate anything else so if you want to translate user profiles taxonomy terms menus views whatever else it there's no help for you in there there's nothing so Jose revier Jose ray ray hero went on and build

the i-89 module suite which has a lot of modules in there and it helps you actually translate a lot of other things like menus taxonomy terms field configuration we views to some degree etc the problem there's is there is a lot of modules to do this stuff

because Drupal core is not multilingual in those areas in seven so it needs to work around roopa kaur and try to provide that feature from the outside basically and also there is a generic system that you need to map every functionality to so if you have views

module then you need to have i 18 n and you need to have a 18 m views module so it connects views with the 18 n or if you have web form you have web form and I teen and and then you have web form localization model that connects the two and it quickly becomes

a lot of modules huge maze of modules and this will not even translate your site settings or your configuration so there is a variable module sweet that allows you to translate your site name and all of the other fun things as again on multiple multiples of

modules and then you want to have an e-commerce site and you go and install Drupal commerce and you find that these 30 things that you've installed help you in no way in the process so you install the entity translation module which actually can translate

the commerce entities and then it will use field translation which is very different from content translation and now you have two different solutions on your site for translating taxonomy terms so you can use energy translation i 18 n then you have two methods

to translate nodes you can use content translational energy translation and it becomes a mess so it really requires a lot of planning to build out a multilingual site on Drupal 7 it's possible there's a very great book that you can buy Kristen Paul

wrote it and I tech reviewed it so it should be very great and you can buy that and it explains all these processes but it's a lot of work in a lot of contributed modules and what we really wanted to do is to get from an afterthought to be a base thing

in the system and also to have a system where you build something and its future proof for all the country and rules and all the things that you build for your site so we decided to approach this and using four pillars for areas that we wanted to work on so

we wanted to have a base language system where drupal understand language in every place possible in Drupal core and it would know the language of everything in Drupal core and will not assume things that this menu may be in your site default language or maybe

not that's not something we wanted to keep interplay we wanted to know data about your stuff we also wanted to improve the interface translation software translation capabilities bringing all the stuff that we built in can trip to help you in managing

those translations and then do some more fun we wanted to have a content translation system that does not only apply to notes it applies to everything in content for your site and we wanted to have a configuration translation system that's also in core

and would support you in translating any of your configuration beat views or field formats or our field settings or input formats or user roles or rules or whatever else you you want so let's look at these four pillars and see what we've done in each

area and see how useful these improvements will be for you so the language pillar we wanted to make it very evident in Drupal 8 that it's a multilingual system so we moved language selection up to the first step in installer and we've included all

of the languages that localize drupal org supports so you can pick any of those languages that you want and you can hit hit submit on that whatever you like we even pre select the language for you based in your browser preference so you don't even need

to select one and then you can as you select it it downloads the translations live from the from the internet and then it applies it to your installer and from the second step it's all in that foreign language it supports right to left and it can download

any translations from the community that's available if you don't have an internet connection it will try for a little while and it will say sorry I can download that please proceed in English so it's all built in there so from here on you can

install in your own language there's no manual steps involved there is no install text 10-step process to download something put into place rename the file nothing you just pick the language I'm even pre-select for you from your observe your friends

we also thought it's very important to extend on the language assignment capabilities so what I've said is Drupal core has some language capabilities it can assign language to nodes users and aliases to some degree comments as well but it does in Drupal

7 it cannot assign language to anything else so for all the other data that's in Drupal 7 Drupal needs to assume that it's in some language and in Drupal 7 in the students it's in the site default language and it's very dangerous to change

the site default language on the site that you already built in Drupal 7 don't do that ever because it changes the assumptions about what language your data is in and we didn't want that pain at all in Drupal 8 so what we did is we extended this to

everything that we could in Drupal 8 core so you can assign language to text anomie terms you can say this view is in French or check you can say your site information is in a specific language so when you install in German we save your site name and your

slogan in German so we know that you've installed in German and this information is in German and it's independently assigned to that from any other part of the site and this is extendable to anything so we have a generic system for assigning language

to content to configuration and we build this out for every piece of content and configuration that's in Drupal core so we have all that data we also have very flexible language UI set up for that so we have this content language settings and the admin

interface and we have all the content content entity types they're like comments and users and taxonomy terms etc and then you can select which those types of content which language they will default to and if you want to show a language selector on them

or if you don't want to show language selector on them so by default all of them will save in the site default language but you can configure forums to always be in English if you have a monolingual forum but your site otherwise is multilingual you can

[ ... ]

Nota: se han omitido las otras 5.441 palabras de la transcripción completa para cumplir con las normas de «uso razonable» de YouTube.