Drupal 7: multilanguage content, multi languages inside a site, translation

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys and welcome to another triple s in this lesson I'll talk about multi language content translations and multi light which is inside the site so first thing we need to have a triple-a I'm using the same one from our previous lessons then it's Drupal seven now let's download some modules get the entity translation module this module allows foldable entities to be translated into different languages then internationalization module this is a collection of modules that extend Drupal core multilingual capabilities and are able to build real-life multilingual sites internationalization module also requires viable module so down on that as well now let's get our Drupal instance and log in with an admin user before we activate these new modules let's talk a little about the reasons of why we need multi languages and translations well number one reason is that the not all operators are from your country then what about if your country has two official languages like Canada Canada has both English and French languages so from the start a client from Canada will want a multi-language site another reason is that multi-language site brings you more customers and so you will see an increase of yourselves then a multilingual site demonstrates you think working here internationally I as a developer work with English language as a default one but my client might want to have the interface and content in another language let's say a Chinese and I don't know that language when I deliver decide I could remove the English language but how would I be able to help the client with the site updates if I won't be able to understand the interface okay enough talk I think you get a point so let's activate the modules go to modules page search for entity enable entity translation it says here that it requires another module that it is disabled it's okay you will be asked in the next screen if you want to enable it so that you can enable entity translation then also entity translation menu now search for internationalization module activate it this one requires two modules both disabled now save configuration here it serves you that some other modules are needed to be activated in order to activate the selected ones click continue now let's see if entity translation is activated search for translation and let's activate some more modules fill translations taxonomy translations and variable translations now let's add some languages to our site under configuration go to regional and language and then click languages here you see that you already have a language this is a default language either the one you've installed your Drupal instance you will not be able to translate strings from this language so it is best to duplicate it click add languages and let's create a new language click custom language and complete fields now make this language the default one let's add a new language now since I'm from Romania I'll choose Romanian language from the drop-down since Romanian is not default language you can edit or delete it let's also change the part prefix code for English language we've added the same language code for English language good now that we have two languages we have to configure the detection and selection rules let's enable URL method for both user interface and content user interface texts are this range from tab or strings formal form buttons or anything else that you cannot add from a field now we have two methods enable URL and default so first Rupa looks for a language code after the host like /ro or solution and if that is not present it will show the content in the default language in our case in English we can configure your own method to look for either path prefix or domain now let's go to a content type and activate translations structure content types and click project or whatever content type you want on the publishing options tab you will get a multilingual support option check enable whitfill translation and hide the translations link this way you will be able to change the language only from the language switcher block save content on now on the montrose page search again for any translation one next to each your CEO permissions name and if you click the small arrow also configure one click on finger we need here to select the entities that can be translatable Nord is by default check but also check taxonomy term well also check user save now for nodes the only get project because only for project content type you've activated the translation choose as default language for a newly created node the default language option hide the language selector and exclude the language neutral from the available languages do the same for a taxonomy term and user tops save configurations let's enable translation for a new content type as it article and enable translation back to entity translation page and refresh now you also get the article content type as an option or configuration do the same settings and click Save let's add a node of type project it looks bad but do not look at the CSS part for now you'll get the new top translate click it here you'll see a table with old languages you also see that the English us is the content original language and that it is published for the rest it says not translated in on the operations not translatable fields this means that even if you activated a translation option for the main content type you still have to do something for the Phils so back to content types page and click manage fields for project in a previous video I've said that to be able to have the content title field as a separate field and to be able to translate it you will need the title module after reactivate module the title fields appear in to the manager staff and you get a replace link click it now instead of the representing you get the edit and delete let's click Edit the form looks like the one from a normal text world at the end of it for the fill translation option you get the disabled translation link this means that the translations are activated for this filled back to the manage fields form for image field we do not need to activate translations we want the same image no matter what the language let's translate the body field click Edit and then go to the bottom of the form there under fill translation you will find on enable translation link also you will see a list of content types word is your dis present meaning is that it was either added by default by Drupal or from one add existing field option click enable translation and then conform scroll down disable translation appears safe now let's go back to the translation page of our newly created node and refresh it under operations we get links to our translations click Add for romanian language as you can see we are on the edit tab now we get two extra sub tabs with the name of the languages we are on romanian language let's change english string to romania no see strings on there let's add the content language switcher block to the left sidebar regions so that we can switch between languages and see the change let's check the name of the region sidebar first whoops there now let's drag it on top of the other blocks now see and let's refresh our node see language switcher block is done we are on Romania let's click English us and there you go you get the English version of the note click Romanian again and you'll get the Romanian version easy right okay now for the interface translations interface means that text for edit translate Devon let's search for them go under configurations then original in language and then click translate interface this is the overview page where you get an overview of available translatable strings click translate we get a list of all strings and also a form to filter strings such for level with capital letter translations are case sensitive and they also depend on the world they were discovered you have multiple results but try to find the one that has the path close to where we have the string that you want to translate the last one looks like what we need see the first one is still double but with lower case e and us and draw ours right that means that there are no translations added for this world for those languages click Edit let's add something for both and save now let's search for translate the path does not help us but luckily there is only one string that matches the one that we need edit it you see the difference for when you are translations to strings okay back to our node and refresh see strings were translated switch to English yes then we have different strings if you go to the language that was added by default on the instance installed you will get ready for strings and also the node in its default language please feel free to ask me any other questions about this topic thanks for watching and don't forget to subscribe to my channel bye my
Info
Channel: DrupalStuff
Views: 4,051
Rating: 5 out of 5
Keywords: Drupal 7: multilanguage content, multi languages inside a site, translation, drupal 7, multilanguage, entity translation, field translation, content translation
Id: lW8eimp54yM
Channel Id: undefined
Length: 16min 17sec (977 seconds)
Published: Thu Sep 08 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.