From 501c33d2e30fef4ebd089c872cb28d060280b5d4 Mon Sep 17 00:00:00 2001 From: Amigo <49749100+aamigo@users.noreply.github.com> Date: Wed, 17 Jul 2019 17:00:15 +0200 Subject: [PATCH] Updated 050 Easy Translation via excel (markdown) --- 050-Easy-Translation-via-excel.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/050-Easy-Translation-via-excel.md b/050-Easy-Translation-via-excel.md index 3828385..6e66994 100644 --- a/050-Easy-Translation-via-excel.md +++ b/050-Easy-Translation-via-excel.md @@ -19,6 +19,24 @@ That was what we wanted to achieve. The other thing that you need to know Is tha When you think about Create New, Create New is used in many places over in relation to these placeholders. But you only need to translate Create New once. We will add it. The compiler will add it correctly in every other place where it belongs. [00:02:32](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m32s) That's the first thing you need to keep in mind. -### 2. ??? +### 2. Translate Strings: Back, Cancel or Close Once - It is Used In Many Components -The second thing which is almost as important, is that you often have strings that are across multiple components. So the string back for example again or cancel or close It is not only used in one component is used in many components. And so we also said to Ourselves we want to still just translate close Once. [00:03:00](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m00s) And then in every other component where it's used It will automatically be used. And so when we go to JCB if you have a fresh install of JCB And you scroll down and your open language translations You see that there is no values there A same as if you opened languages there's also no values there If you want to have JCB Populate the translation the English strings So where does it get them well it gets them from your fields And from your site views [00:03:38](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m38s) And from Any other place either Your admin view or you know Any other place where you use Translation strings In then it populates dynamically the language translation so you don't really ever need to click New To create any it creates it For you so the way to do that if you would go to the compiler [00:04:04](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m04s) You select the component that you would like to compile And you simply click compile and you need that do that only once now you can just clear that out again You don't need to use it Now if we go back to language translations Suddenly There's a whole bunch of strings here and also tells you that it hasn't been translated and all So just that's quickly and we got Almost 249 strings here And like I said close will only be shown up once [00:04:37](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m37s) So It is with every other strain If we then open one of these You see that you cannot edit the English string now we've had request The people would like to edit the string but it doesn't really make sense because if the string is Is being used In a Field How would we be able to know That their relationship here needs to change [00:05:06](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m06s) For example if you update a string here Now JCB needs to know In that field in needs to update the label for example There's no way for us to it you know to determine that So you'd basically change the string and it won't be useful Because it JCB on compilation Will deter will detect that this string doesn't exist And it will just create it again So the way that you would change a string which is found here [00:05:35](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m35s) Is you need to go and change it in this either The field where it was created Or the site view or the admin View And I mean in this case we know that this word demo Is the components name right so if you wanna translate that string Oh sorry change that string So for example I'll quickly demonstrate that I'm gonna change this demo to two o Like that And then save and close [00:06:14](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m14s) Now I'll compile it again And just cleared out and then go back to our language translation And now You see the demo is gone because Demo is no longer being used anywhere Another component either so the system will automatically remove it If you go to the end of the string will see the new ones Have been added See there So that's how you would [00:06:48](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m48s) Change a English string is you'd go back to where you set it And then from there have it been changed I'm gonna just changed it back quickly And then compile it again Clear it out again Go back to language translations And you see that it's removed the other one and it's added to correct one back Now I'm gonna translate or I would like to translate only this one string And if I wanna do that [00:07:25](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m25s) You see that there's no language is available We decided to allow the languages to be set dynamically meaning That you would manually create them And use them as you like So there is an area called languages You'd click new here And then you'd give the language name and it's tag now the tag We've given you an example here But if you do not know how this should look There are ways for you to find out one of the easiest ways [00:07:57](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m57s) Is there actually just go to Joomlas translation area So if you go to community .Joomla.Org/translations.HTML And then you select I would say just selective This one that's the newest And then you'll see there's a whole bunch of languages here Clicking on any of these Will take you down to that language And basically this is [00:08:24](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m24s) The little tag that you would look be looking for So if you want to do for example Dutch Then this is the the one The the tag that you would use You would use the Dutch as the name And then that as the tag I'm gonna set up just for example I'm gonna setup Afrikaans Is my native language So [00:08:54](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m54s) I'm just gonna use Afrikaans As the language we wanna create And obviously then this is the The tag And you can create any of the languages you want to use We might at some point at a few major languages here And ship it like that but Just that you know you could just create a language You Cannot create a translation for that language unless you've done this You must first create the language [00:09:28](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m28s) It is just the way it works Now we can go back and Let's take a string that Would look different in Afrikaans So let's take author So now here if there's more components which the word author is used in It'll all be linked in here and it all be done automatically you wouldn't need to do any of that You will only really need to focus on this translation area so author in Afrikaans is skrywer or outeur [00:10:11](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m11s) So will use the outeur which is actually more correct And then Will you select the language for which that string belongs And then save and close And that is as simple as that From now on in any component Where the word author is used If The Afrikaans translation with relation to the other strings Is enough [00:10:35](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m35s) It'll dynamically add this language To the component And you would not need to translate it again Now this is all been the way it's been working up till now so this is none of this is new The area that is new Is that you can actually export these strings To a spreadsheet And then You can import them [00:11:04](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m04s) From the spreadsheet and it will dynamically be added so I'm gonna just select a few strings here you don't need to select any of the already translated strings But if you do it will also be used if it doesn't really matter I'm just gonna select a few And Click export data This will create a Excel Spreadsheet [00:11:32](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m32s) Which you can then save I have now open that spreadsheet and you see that it has a bunch IDs And then it has English It's got the The tag of the language And it's got the value that we already set So now I'm gonna set The value for these others in the spreadsheet So now you got your Language [00:12:00](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m00s) File back from your translators And they basically translated it This column Now you can have multiple language every every language will have its own column And All you need to ensure that this top header Is the language tag That's really what's important and that this language Is created and published in your system Do not let them change to English string [00:12:29](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m29s) When you import this file The system will look for the ID and the string To identify that this value exists If it doesn't exist it will simply ignore it So if you change author Even though the ID Remains the Same It will not find it and it will simply ignore this line On the way I'll demonstrate this is I'm just gonna change back to having to k's And Save this document [00:13:00](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m00s) And then let's go back and import it Now the imported is simple we just click on import data Then we select the file from our system Click upload file And it should dynamically mapped the columns in your spreadsheet To the Table columns so you would have Your language strings if you got multiple language It should automatically mapped in If you are having multiple languages and you only one import for the one language [00:13:35](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m35s) Then all you need do is add this ignore the column next to the language as you do not want to import Ok and then you click continue And that is it you will now see That it has added translations Except for back Now At first it didn't actually add these so I had to quickly go and add a little fixed to the import I didn't realize that [00:14:06](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m06s) At the moment It actually would stop at the first failure And not import further But I've just fix that and should Within the next update this should be resolved Anyway the point is Once you've imported it you'll see that it is added The translations to Those [00:14:27](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m27s) Strings And it's also mapped it to the correct language But back was not imported because the English string didn't actually correspond If we go back to our spreadsheet And fix this little error And in fact make a little tweak to What are the other strings Just for example sake And then go back to importing this file after Saving it of course Save [00:15:02](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m02s) So again import data Browse Now you'll see that back is been done And the other one that we also played with was disclosing new We added to the double T there So now you are able to export This language strings Translate them in a spreadsheet And easily import that spreadsheet Which word automatically update [00:15:38](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m38s) Your values here if you Have updated more than 50% of the English strings To a specific language It will automatically be added to your component You can change this percentage By going to options In JCB And then basically changing this Select the percentage any language should be translated before the system Should add the language to component during compilation [00:16:12](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m12s) So that means If more than 50% of your English strings have been translated It starts adding it to the component If not It will just ignore it Ok that is Giving you a quick demostration of the new import export Option in translating The strings in your system And knowing that if you have translated any of these strings will only [00:16:41](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m41s) You need to do it once And it will dynamically be available to every other component that uses that field or that View And therefore these English strings Thanks for watching +The second thing which is almost as important, is that you often have strings that are across multiple components. The string 'back' for example again or 'cancel' or 'close'. It is not only used in one component is used in many components. And so we also said to Ourselves we want to still just translate close once. [00:03:00](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m00s) Then in every other component where it's used, it will automatically be used. When we go to JCB, if you have a fresh install of JCB, and you scroll down and your open Language Translations, you will see that there is no values there. Same as if you opened Languages there's also no values there. + +### JCB Populate Dynamically The Language Translation, English Strings - Where Does It Get Them? + +[00:03:26](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h30m26s) + +If you want to have JCB populate the translation, the English strings. Where does it get them? It gets them from your fields and from your site views, [00:03:38](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m38s) and from any other place, either your admin view, or any other place where you use Translation strings. Then it populates dynamically the Language Translation. You don't ever need to click New to create any, it creates it for you. + +### The Way To Populate The Language Translation + +[00:03:59](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m59s) + +The way to do that if you would go to the compiler [00:04:04](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m04s) You select the component that you would like to compile. You click compile and you need to do that only once. You can just clear that out again. You don't need to use it. If we go back to Language Translations, suddenly there's a whole bunch of strings, and it also tells you that it hasn't been translated and all. We got almost 249 strings. Like I said close will only be shown up once. [00:04:37](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m37s) It is so with every other string. If we then open Demo, you will see that you cannot edit the English string. We've had request that people would like to edit the string. It doesn't really make sense because if the string is being used in a field, how would we be able to know that their relationship needs to change? [00:05:06](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m06s) For example if you update a string, JCB needs to know in that field it needs to update the label. There's no way for us to determine that. You'd change the string and it won't be useful. Because JCB on compilation will detect that this string doesn't exist, and it will just create it again. + +### The Way To Change A String - Where it was Created - Field, Site View, Admin View + +[00:05:34](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m34s) +???? +The way that you would change a string which is found here, is you need to go and change it in either the Field where it was created or in Site View or in Admin View. And I mean in this case we know that this word demo Is the components name. right so if you wanna translate that string Oh sorry change that string So for example I'll quickly demonstrate that I'm gonna change this demo to two o Like that And then save and close [00:06:14](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m14s) Now I'll compile it again And just cleared out and then go back to our language translation And now You see the demo is gone because Demo is no longer being used anywhere Another component either so the system will automatically remove it If you go to the end of the string will see the new ones Have been added See there So that's how you would [00:06:48](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m48s) Change a English string is you'd go back to where you set it And then from there have it been changed I'm gonna just changed it back quickly And then compile it again Clear it out again Go back to language translations And you see that it's removed the other one and it's added to correct one back Now I'm gonna translate or I would like to translate only this one string And if I wanna do that [00:07:25](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m25s) You see that there's no language is available We decided to allow the languages to be set dynamically meaning That you would manually create them And use them as you like So there is an area called languages You'd click new here And then you'd give the language name and it's tag now the tag We've given you an example here But if you do not know how this should look There are ways for you to find out one of the easiest ways [00:07:57](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m57s) Is there actually just go to Joomlas translation area So if you go to community .Joomla.Org/translations.HTML And then you select I would say just selective This one that's the newest And then you'll see there's a whole bunch of languages here Clicking on any of these Will take you down to that language And basically this is [00:08:24](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m24s) The little tag that you would look be looking for So if you want to do for example Dutch Then this is the the one The the tag that you would use You would use the Dutch as the name And then that as the tag I'm gonna set up just for example I'm gonna setup Afrikaans Is my native language So [00:08:54](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m54s) I'm just gonna use Afrikaans As the language we wanna create And obviously then this is the The tag And you can create any of the languages you want to use We might at some point at a few major languages here And ship it like that but Just that you know you could just create a language You Cannot create a translation for that language unless you've done this You must first create the language [00:09:28](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m28s) It is just the way it works Now we can go back and Let's take a string that Would look different in Afrikaans So let's take author So now here if there's more components which the word author is used in It'll all be linked in here and it all be done automatically you wouldn't need to do any of that You will only really need to focus on this translation area so author in Afrikaans is skrywer or outeur [00:10:11](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m11s) So will use the outeur which is actually more correct And then Will you select the language for which that string belongs And then save and close And that is as simple as that From now on in any component Where the word author is used If The Afrikaans translation with relation to the other strings Is enough [00:10:35](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m35s) It'll dynamically add this language To the component And you would not need to translate it again Now this is all been the way it's been working up till now so this is none of this is new The area that is new Is that you can actually export these strings To a spreadsheet And then You can import them [00:11:04](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m04s) From the spreadsheet and it will dynamically be added so I'm gonna just select a few strings here you don't need to select any of the already translated strings But if you do it will also be used if it doesn't really matter I'm just gonna select a few And Click export data This will create a Excel Spreadsheet [00:11:32](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m32s) Which you can then save I have now open that spreadsheet and you see that it has a bunch IDs And then it has English It's got the The tag of the language And it's got the value that we already set So now I'm gonna set The value for these others in the spreadsheet So now you got your Language [00:12:00](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m00s) File back from your translators And they basically translated it This column Now you can have multiple language every every language will have its own column And All you need to ensure that this top header Is the language tag That's really what's important and that this language Is created and published in your system Do not let them change to English string [00:12:29](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m29s) When you import this file The system will look for the ID and the string To identify that this value exists If it doesn't exist it will simply ignore it So if you change author Even though the ID Remains the Same It will not find it and it will simply ignore this line On the way I'll demonstrate this is I'm just gonna change back to having to k's And Save this document [00:13:00](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m00s) And then let's go back and import it Now the imported is simple we just click on import data Then we select the file from our system Click upload file And it should dynamically mapped the columns in your spreadsheet To the Table columns so you would have Your language strings if you got multiple language It should automatically mapped in If you are having multiple languages and you only one import for the one language [00:13:35](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m35s) Then all you need do is add this ignore the column next to the language as you do not want to import Ok and then you click continue And that is it you will now see That it has added translations Except for back Now At first it didn't actually add these so I had to quickly go and add a little fixed to the import I didn't realize that [00:14:06](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m06s) At the moment It actually would stop at the first failure And not import further But I've just fix that and should Within the next update this should be resolved Anyway the point is Once you've imported it you'll see that it is added The translations to Those [00:14:27](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m27s) Strings And it's also mapped it to the correct language But back was not imported because the English string didn't actually correspond If we go back to our spreadsheet And fix this little error And in fact make a little tweak to What are the other strings Just for example sake And then go back to importing this file after Saving it of course Save [00:15:02](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m02s) So again import data Browse Now you'll see that back is been done And the other one that we also played with was disclosing new We added to the double T there So now you are able to export This language strings Translate them in a spreadsheet And easily import that spreadsheet Which word automatically update [00:15:38](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m38s) Your values here if you Have updated more than 50% of the English strings To a specific language It will automatically be added to your component You can change this percentage By going to options In JCB And then basically changing this Select the percentage any language should be translated before the system Should add the language to component during compilation [00:16:12](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m12s) So that means If more than 50% of your English strings have been translated It starts adding it to the component If not It will just ignore it Ok that is Giving you a quick demostration of the new import export Option in translating The strings in your system And knowing that if you have translated any of these strings will only [00:16:41](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m41s) You need to do it once And it will dynamically be available to every other component that uses that field or that View And therefore these English strings Thanks for watching