 Hello everyone, I'm assuming you can all hear me. I've been told though that I have to use the microphone in order for the video to pick me up. So I will try not to yell because I get yelled when I'm nervous. I also stutter a little bit, but we should be good to go today. So before I start, I just want to do a quick question. How many people have used a multilingual plug-in for WordPress before? How many of those are not WPML? All right, so we've got some experience and some new guys here. What I'm going to be talking about today is the initial setup, settings to look for how the concept of what WPML does behind the scenes in order to do the translation and show it properly on the front of the site. There are some things that WordPress does in conjunction with WPML that are a little hidden or we're going to go through the entire setup process together, okay? This talk, this session is aimed at people who are interested in learning on how to set up WPML. If you're already a WPML expert, there's probably not going to be a lot here for you, but what I'm hoping to expose here are maybe some concepts that will help you after you've decided to pull the trigger, turn your website into a multilingual, and you're wondering how to do a specific thing. So I'm going to show you how to actually do all these things together. Not much in the way of slides, probably about 10 minutes, and then we're going to dive into some live demo stuff, all right? If you have questions, raise your hand. I'll repeat the questions so everyone can hear it, and then hopefully I'll have a scintillating answer. So welcome. What we're going to learn today is how to set it up, how to do the primary translation. A primary translation is something that doesn't exist anywhere except in my brain, but it is dealing with the primary stuff that WordPress deals with, pages, posts, taxonomies, menus, widgets. I'm going to show you how to do that today, and we're going to talk about things to look for, like changing some of the labels that are baked into WordPress itself. A bit about me, rah, rah, rah, I'm very tall, in case you haven't noticed that. A little nervous, so bear with me. All right, so WPML, WPML is a commercial plugin. It has a whole bunch of chunks that go with it that handle the various aspects of what it takes to translate a website, but what it's providing you is the framework and the ability to do the translation. It's not going to translate your content. It's not a magic button. There's not a little French guy that comes with it that's going to live inside your computer and say, oh, we've got to change that one. No, it doesn't happen. You're still responsible for that, whether you choose to do it yourself, whether you choose to take advantage of the tools that are provided by WPML to facilitate an external translator, or whether you take advantage of they have an actual translation service that can hook into, and these are all things that are beyond the scope of today, but just so that you're aware of them if you need help doing the translation, that kind of thing is available. I have yet to come across something that I could not translate with WPML. Some of it is more interesting than other things. A specific case that comes to mind is I, does anyone here know what Genesis is? Genesis is a framework that provides the ability to do a whole bunch of stuff and then you make a child theme. I'm not going to talk about that, but what it does provide is the automated way to make a custom post type archive page and translating the content of the custom post type archive page was a fun adventure, but it did work, and that's the point of this software. The easy stuff is simple, the medium stuff may be a little tricky, but it's possible, and the hard stuff may drive you around the band, but eventually you'll get there. The underlining concept, the core concept of how WPML works is that what it does is it creates new items for each one of your translated content. If you have a post, once you translate it, it's not like a beaver builder situation where it's hiding something from you in that one post. It's not using short codes to hide something from you. What it's doing is it's creating an entirely new post object in the database and linking the two together. It does that with everything, menus, pages, taxonomies, everything. That concept, the reason why they do that, well I don't know the reason, but the effect of why they do that is that things like migrating your site to a new host are a snap because as long as you have all the post objects and the taxonomy objects, everything stays linked together. If you decide you don't want to do it anymore, you turn it off and all your posts are just listed there. The non-primary language ones just don't disappear. What we're going to talk about, we may get to special cases, we may not, but at the end of this you're going to feel confident faced with a site that you need to do some translations on. That's my goal here today. Very important if you have questions as I'm going that you ask them. I want you to be empowered to do this stuff for yourself once I am no longer up here yelling at you. Alright demo time, here we go. So it's a plug-in, the plug-in is activated, but in order for you to use it first there's a bit of a setup process so we're going to go through that first. Now the other core concept that WPML relies upon is that of what is called the primary language. The primary language is considered to be the content that everything else is a translation of. In the case of this demo that's going to be English, but you'll see that you can choose whatever you want here because at this point WPML doesn't know anything about your site at all. So you have to tell it what the first language is. If your first language is French then you would select French here and then you'd be doing an English translation or Finnish or whatever it is you want to do. So that's the first thing it needs to know. The next thing it needs to know is the languages that you want to translate into. So we'll choose French here just to keep things Canadian. Now there are a few things that it's going to try and set up for you from the start. Yes, yes, what's my approach? So the question was if you're starting from a French install of WordPress that has French content, what do you do? Correct? Is that about it? Yeah. Yeah. Okay. The root of the question is, I believe, how does the version of WordPress that you've had installed, the language, the localized version of WordPress that you've installed affect WPML? And the answer is it doesn't. It doesn't matter. The localized versions of WordPress deal with admin strings. They don't deal with content. And WPML, at this point, doesn't know what language your content is in. So my approach, if I was starting over, and let's choose Greek because that's what you brought up, my approach would be I have a site in Greek, doesn't matter what version of WordPress I've installed to host that Greek content because the only thing that affects is the language in the admin. Install WPML, tell it Greek is my primary language and carry on from where we are now. Good. Nobody else? I'm a genius. All right. So language switchers, obviously what we need to have in the site is the ability for your users to switch between languages. This is handled in one of three places by default, and then you can use short codes to stick it anywhere you want. First place is the menu, second place is somewhere in a widget, third place is in the footer. What we're going to be doing is add one into the menu. So when you are presented with this third step here, you can change the order of the language if you want to. We're going to skip down to here though. So this window pops up. We're going to choose the menu that we want. It's going to show you what it looks like over here. So I don't want the stuff in brackets. So let's get rid of that, and we're good to go just like that. So now you don't know what that looks like yet, but I'll show you what that looks like once we get through this site. Yes. So the question was, is there a Quebecois flag? The answer is no. So the English flag is the Union Jack because that's where English started. So if you're in the United States, if you're in Canada, if you're in England, English is always that flag. Now, is there a way to change the flag? Yes, there is. It's difficult, but it's possible. And yes, I have done it. We're not going to talk about, we'll stick one in the foot or two because why not? We'll just leave that one alone. Am I humming a bit? And then we'll say next. We don't want to send anything to them. I don't think today. And now it's going to ask for my registration, which we'll do later. OK, so now we have a site that's ready for translation. And you'll see the language switcher up here. You see it doesn't list French though. Everyone notice that? WPML by default starting I think like three or four months ago when you set it up on a new site will not show you the language switcher unless it detects translated content for the page that you're on. So we have not translated the home page yet. Therefore, French is not going to be shown because there's nothing to show you. There is a setting in WPML that will let you say, you know what? Show me the French menu anyway. But when I click it, just show me the English, right? That is likely not what you want to do. A, because it's probably going to piss off the people that are not in that language and B, it's going to make you lose track of what you translated if you don't see it in the front end of your site, right? Because if you do this, I do a lot of work with nonprofits that are multi-lingual. And when we have that site left on, it's easy to miss when they're doing QA, which pages have been done and which haven't. But if you leave that off, then they're like, okay, well, where's the contactless page? Well, you haven't translated it yet. So that's just a little workflow thing. Let's go back, if I can, into the event. And we're going to look at posts. So there is one post here. Hello, world in English. There are a couple things in the user interface to be aware of. Now, that have changed since WPML has become active. The first thing is this guy right up here. This is going to allow you to switch, obviously, the language of the content that you're looking at. So if I go into, this is the post list. If I switch that to French, there's going to be no posts because we haven't translated anything yet. So what we're going to do is we're going to go into the English and we're going to click the column here that says add. Now, you'll see that this has changed to French. And it's also saying that we're going to skip some stuff. We're just going to copy this from English. And I'm going to publish so you can see this really quickly. Now you'll see that this is a translation of hello world. Now, why is that cool? Can anyone take a wild guess why that's cool? Now, you already asked the question. I got my eye on you. Close. Close. There was a hand up over here, no? The reason why this is cool is because it gives you the ability to tell this French page which English page it's a translation of. So let's say you've got a bunch of English pages and a bunch of French pages in your site already, but you haven't been using WPML. How do you link them together? The way you link them together is you go into the French page, you declare that it's the French page, and then you choose the English page that it's a translation of. Cool, huh? It is cool. You guys don't realize that yet, but that's very cool. Now, the language bit on the side here is the bit that lets you control. It shows you all the WPML stuff for the particular language. Now, we're going to update this. And now, we're going to go and check out the site for the home page. And I look at, oh, that's right. It's a blog page. I knew that. I knew that. I knew that. So now, we have Hello World in English, and ta-da, French works, and Presto Chango. Now, we have French. Now, how does WPML know to pull up the French page here? Nope, wrong. That's cheating. What if I gave you a link to this page? How would it know? It's in the URL. So WPML gives you the ability to determine how the languages are going to be shown as part of the URL. The first way is like that. With the question mark lang, it's a URL parameter, right? Ugly. The other way is to put it as part of the URL itself. So now, let's go into WPML. Was that? That's it. I knew that. Different languages and directories. So we save that. Now, we go up here and watch the URL. It's amazing that it didn't work. Different domain per language. No, that's not what I want. Different languages and directories. Oh, I didn't save it. Is there a bottom save, too? No, there is not. OK, well, let's assume that worked. So just close your eyes and imagine that what you're seeing right now is a URL that says WPML1.test slash fr slash hello world. Because that's what it's supposed to do, but it's not. Oh, I'm getting wise cracks in the back now, yeah? It could be. Let's try that. What's that? I didn't hear what you said. Oh, yes, he's asking if it's a problem between the chair and the keyboard. And it was. It was a problem between the chair and the keyboard. Let that be a lesson to you. When you're having a problem, the problem is almost always between the chair and the keyboard. What's that? Oh, you guys are getting rowdy now. Hold on. Save the rowdy stuff. I got you and I got you. So save the rowdy stuff till later. So that's posts. Clear, right? Pretty easy, right? Everyone clear on that? No magical questions? No? Yeah, oh, there's one in the back again. The problem with, OK, the question is if you have French content and the French permalink for the French content is also in French, can you skip having slash fr? Is that a fair summary? OK. The answer is yes, asterisk. The asterisk is don't do that. And the reason why you don't do that is because what you're assuming is that there will be no name collision in any permalink in any content anywhere. So yes, I agree with you that the permalink for translated content should also be translated. But you will cause difficulty for yourself if you try and remove that FR thing in the URL. So the answer is yes, but don't do it. Yeah, another in the back. Yeah, it's possible. It's another one of the settings in here for WPML languages. Pardon me. Oh, yes, repeat the question. I'm being admonished. The question was, can you use a different domain for different languages? And the answer is yes, asterisk. Don't do it. Why shouldn't you do it? Anyone? SEO. Right, the wisecrack on the side, SEO. When you Google treats subdomains as different properties, so you'll lose some Google juice if you present different content in different ways. So as a general rule, don't do that. But you definitely can if you want to. OK, I got one more question, because then I got 15 minutes to get through taxonomies, menus, and pages. Go ahead. Oh, boy. Talk to me after class. So pages are more of the same. We go into English, and we have some pages here. It's the same type of thing, except what I'm going to do is show you how to translate it from the page site itself. So once you're in the page itself, you can also add a translation by clicking the French. And presto changeo, here we are again. And we're going to just save some time. Now we have the home page translated, which please work. And look at that. See, now we've got homeFR. Cool, right? Easy, straightforward, mostly. Now, menus. You know what? Let's not talk about menus yet. You guys aren't ready for that. Let's talk about taxonomies. Now taxonomies work exactly the same way. They're created as a duplicate. They are linked to the post in French that the English term was linked to in English. Said another way. If you have a post that has a category assigned to it and that category has a translation, when you translate the post, the linkage is preserved. Cool. That's also very cool. You guys, again, don't realize that, but it is. It'll save you a lot of time. So how do you translate a taxonomy? We go into the primary language. We edit it. And we say we want to show the translations. And presto changeo. Now we can edit the French translation. More rabble in the back. The French category. OK, the question is if you do everything I just told you to do in the reverse order, will it work? So if you have a category, so is it doing a big circle to get back? The answer is no. So the question was, when WPML is doing the lookup for, I've got a French page. I need to know what category to show. This French page is a translation of this English page. This English page is categories with this category. Go get me the French version of this category. It's not doing that. What it's doing is, I've got a French version of this page. It is linked to this category. Show me that category. So it's exactly the same as it works in English. And the reason why it's exactly the same is because taxonomy assignment parity is not enforced. So you can have different categories for different languages if you want to. Answer your question? All right. So that's taxonomies. Again, straightforward. Any questions about taxonomies before we get into? Oh, god, that back row again. Go ahead. The title doesn't matter, but the slug, you'll have a problem with the slug. Something like that. There are a few cases that are like that. But yes, because when they got rid of sharing finally, you have to have unique URLs for that stuff. So yes, the question was, what happens if you have an English and a French word that are the same for a category? And the example was sports. You have a sports slug in English and a sports slug in French. They will conflict, so one of them will have to be sports-en or sports-fr or whatever. Yes. The question was, if the URL already has the language code in it, why can't it be domain slash fr slash sport for English and slash sport for French? It's because remember I told you that a translated entity is the same type of entity duplicated. It's not a meta field. And within WordPress, only one entity can have one slug. So you can't have two pages with the same slug. You can have two posts with the same slug. You can't have two taxonomy terms with the same slug. And that's why. All right. You guys look like you're ready for menus. This one is going to curl your hair. This is why I'm bald, trying to figure out menus. So when we go into menus, you will see. Oh, we're in French again. Let me switch over here. You will see that. So this is the English menu. Now there is the hard way and there is the easy way. The easy way is also hard. But it's a different kind of hard. The hard way would be to manually create a new menu, manually propagate all of the translated content into it, and then manually track any changes. Who wants to do that? Anyone? Bealer? No. No one wants to do that, because that's a nightmare. So that's the wrong way. So now that I've told you how to do that, you're going to go back 10 seconds in time and forget that I said that 10 minutes already. So there is a very helpful tool here called Menu Sync. This is the easy way, but it's also hard. And the reason why it's hard is because the user interface is challenging. What this is allowing you to do is automatically synchronized content that has been translated already. So you don't have to bother with, did I change the order of that and did I do it in front? You don't have to bother with that. So you'll see here that what it's going to do is add an item called HomeFR to the menu called MenuFR. And since we don't have a blog or contact translated, it's not going to do anything. So this is telling you what it's going to do. Anyone have any questions on this? No, right? It's fairly favorable. Now you're going to sync. And this is the part where it is challenging to me. Now you get the option to choose whether you want to do it or not. So after you've said OK, you get to say OK again. This is useful, I suppose, because it gives you the ability to identify the items that it thinks it's going to do something with and not do something with them. So why is that useful? Sometimes there are things that get stuck into menus that need to be handled manually. So one of the things that I've done is I've used CSS stuff to stick icons in menus. That kind of stuff doesn't translate over. So sometimes you have to have specific menu items that you have to do manually. So we are going to apply changes. And now we have homeFR. And you'll see that the other two pages are not shown in the menu because there's no translation for them. Now it's cool. It's not super obvious, but it is super handy when you get into a project and you're like, OK, well, now we've got a contact page. We need to add that in here. And then on it goes. So useful to be able to do a couple clicks to sync it. Spend a little bit of time figuring that out and we're good to go. Question? Does it say synced? The answer is no. It does not stay synced. It gives you the ability to sync. Well, it is one way and it is not a persistent sync. Let's put it that way. All right? Yes. Excellent question. The answer is yes, asterisk. It's a setting. There's an option in WPML settings to say if I'm coming at you in the French version of Chrome, show me the French content. But yes. Well, I agree. You don't want to annoy anyone you can avoid annoying unless they're annoying you. Menus, taxonomies, oh, widgets. At the bottom of the page, how much time do I have? Five minutes, right? I can do widgets in five minutes. So, we have widgets section and we have all these guys down here. Now, I'm going to go quickly here and I'm not going to take any questions because I've only got five minutes and then I'll take the questions because I want you guys to see this because there are two things that have to get done with widgets. There's the content and then there's the title. They're handled differently because there are different parts of WordPress. So, we have, that's not what I want, we have widgets and we have the text title widget. Now, look at that, isn't that awesome right there? See that? Now, you can determine which language your widget is going to show up in, which means that whatever you stick in that text box will show up currently in all languages unless I say only show it in English and now it will only show in English. So, that gives you the ability to add another text box to show only in French and you jam the French content in there and everyone's happy. Yeah, good, yes. But it's the same in all languages. The question is what happens when you change, use the language switcher at the top of the page to switch into different languages. The widgets page itself, what you're looking at right now will always show you all the widgets in all the languages. I don't understand. Ask me after, let's try. Maybe you know something I don't. It's exactly the same. So, the question was if you switch the language of the admin interface, will it affect the widgets that are shown and the answer is no because the widget page is not language aware like that. That may be too. As you can see, I'm just a young guy, so I haven't been using it so long. So, let's look at this special case before I get the hook and that is navigation menu. So, we're gonna say that we want this one only shown in English. Now, we're going to add another navigation menu here. We're going to select the main menu in French and we're going to say we want to show it in French and we're gonna click save there too. Now, who knows what's gonna happen here? Uh-oh, didn't put the title in. Ah, I knew that. No, that's not what I want. Who wants, you come up here and drive it. Hold on, hold on, hold on. I'm trying to get the point across that you changed the title too. Okay, now, we got that settled. Let's talk about this one because this one will drive you crazy. So, if you pay no attention to anything, everything else that I've shown you here so far other than maybe the menu weirdo thing, you'll figure out by, this one will drive you to drink. In, there you go, then it will make you drunker. Is that a word? More drunk? Drunk-ish, drunk-adjacent. So, we have that title meta, but you'll see that's not a title you can change. It's going to be meta anywhere. So, how do I change that in WPML? You have to add this one right here. WPML string translation. Now, I have exactly zero minutes to talk about WP string translation, but the gist of it is that this little magical piece of joy will eliminate the ability to require Poe and Moe files. It will eliminate the ability for you to harass your theme and plug-in people to translate their plug-in because now you can do it for them. And what it also does is it gives you access to some of the internal WordPress strings so that you can translate some of this stuff yourself. So, when you enable this, what it does is it adds this guy right here, string translation. And this is a very, very scary looking page, but the point is that you can now edit the meta title, call it metafr, make sure you mark it as complete because that will also drive you insane. Hopefully I know what I'm talking about, metafr. How about that, cool, right? And you have access to both the admin strings in WordPress and all of the stuff like what appears by default in the search bar. Basically, every bit of text that's translatable is called a string and they are available in the string translation add-on to WPML. So, quickly, WPML has a bunch of add-ons that will let you do things with advanced custom fields, with gravity forms, with a whole bunch of other things that need special care and consideration. And that's all I wanna say about WPML except for one thing. I wanna close with what the order that you should do your translations in to make your life easier. And this is hard-fought knowledge. If you have a site in one language and you are ready to do the translations into your next language, the first thing that you do is your taxonomy terms. Do them first, okay? The second thing you do is pages and posts. The third thing you do is everything else, yeah. Okay, why do you do it in that order, anyone? Because if you translate a page and the taxonomy term is not also translated, you may not get that taxonomy term assigned when it is translated. Cool, yes, question. So far as I know, because they are different URLs, they will be combined into one giant sitemap, unless you have a language-aware sitemap generator of which I'm not sure one exists. I don't know the answer to that. I'm giving you my best guess. And my best guess is it's gonna just, show you everything. Yes, back row, again. Say that again? SEO. Do I have any suggestions for SEO with multiple languages sites? That is an entire weekend conference. And unfortunately, I, in this universe, only have control over the next four minutes. So the answer is yes. Yes. I'm saying that if you have a site already and you want to translate it, then that's the order you wanna do it. But go ahead and ask your question. Yes. The question was, do you have to do the entire site before you start the translation? The answer is no. You can do it as you go. Anything else? No one? Oh, there we go, yeah. One of them deals with the featured image. So if you have a featured image assigned to the EN post, by checking that box, it forces all translations to use that same featured image. The other one, I have no idea what it does. I haven't been able to figure it out either. Yeah. Do I have performance tricks for WPML on a site to make it load faster? Yeah. It's slowly. Yeah. So the question was, when you use WPML, how can you mitigate the effect it has on your site performance? I have three answers to that. The first answer is that's just how it is. You're getting a whole bunch of ability and technique and all the rest of it. It comes at a cost, okay? That's the first answer. The second answer is caching. The third answer is there is a nightmare scenario checkbox in the string translation thing at the bottom that you should probably not use, but I'm gonna show you what it is. Don't use that, okay? Now that I've shown you where it is, don't use that. Use it when you're doing development. Never use it on a live site, okay? I'm not gonna tell you what it is because I don't want you to know. Yeah, I have no idea. Probably. But remember that the content that WPML doesn't necessarily care with how the content is presented because it creates a duplicated object. So whether you use Gutenberg or the classic editor, it's still gonna have the same content. It's just gonna have a different language version of it. So my answer is probably. One more question. Someone over from this side now, come on. Left side, nothing, nothing. There. I just saved your life. Watch this. Oh boy. I get beers for this. Beers. Beers for this. Different languages and different directories. Bam! Did you check between the chair and the keyboard? No. I don't know the exact answer to that because I haven't run into that exact problem. What I will end on though, is that the WPML team are fairly good at responding to specific problems you may have. There is a gigantic warehouse of already answered questions and there are a ton of things on the internet on how to do this stuff. Except. Except if. Except if you're on her network. I'm sorry for your experience, I can't speak to that but I can only speak to my own experience and when I've contacted them it's been fairly positive. That is all, thank you. Just a quick reminder.