Updated 050 Easy Translation via excel (markdown)

Amigo 2019-09-03 15:44:30 +02:00
parent b38d2589ce
commit bf6fd658a2

@ -36,7 +36,7 @@ If you want JCB to populate the translation. I will get the English strings from
[00:03:59](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m59s)
Go to the compiler and select the component that you would like to compile. Click compile and you need to do that only once and clear that out again. Return to the Language Translations, there are almost 249 strings, and it has not been translated. Like I said 'close' will only show 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 Demo is opened, it can be seen that the English string cannot be edited. There had been a request that people would like to edit the string. It does not 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 is no way for us to determine that. If the string is changed and it will not be useful because JCB on compilation will detect that this string does not exist, and it will create it again.
Go to the compiler and select the component that you would like to compile. Click compile and you need to do that only once and clear that out again. Return to the Language Translations, there are almost 249 strings, and it has not been translated. Like I said 'close' will only show 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 Demo is opened, it can be seen that the English string cannot be edited. There had been a request that people would like to edit the string. It does not 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 is no way for us to determine that. If the string is changed and it will not be useful because JCB on compilation will detect that this string does not exist, and it will create it again.
### The Way To Change A String - Where it was Created - Fields, Site View, Admin View
@ -64,32 +64,32 @@ One of the easiest ways is to go to Joomla's Translation area. If you go to http
[00:09:31](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m31s)
For example take a string that would look different in Afrikaans. Let's take 'Author'. If there are more components which the word Author is used in, it will all be linked in here and it all be done automatically. You will only need to focus on this Translation String area. Author translated in Afrikaans is 'outeur' [00:10:11](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m11s) Then you will select the Language (Afrikaans) for which that string belongs. Then save and close. 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 will dynamically add this language to the component and you would not need to translate it again. This is all been the way it has been working up till now. <<<<<
For example, take a string that would look different in Afrikaans. Let's take 'Author'. If there are more components that the word Author is used in, it will all be linked in here and it all be done automatically. You will only need to focus on this Translation String area. Author translated in Afrikaans is 'outeur' [00:10:11](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m11s) Then you will select the Language (Afrikaans) for which that string belongs. Then save and close. 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 will dynamically add this language to the component and you would not need to translate it again. This is all been the way it has been working up till now.
### New Area - Export And Import Strings From Spreadsheet - Dynamically Been Added
[00:10:51](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m51s)
What is new, is that you can export these strings to a spreadsheet, and then you can import them from the spreadsheet and it will dynamically be added.[00:11:04](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m04s) I am going to select a few strings. You do not need to select any of the already translated strings, but if you do, it will also be used if it does not really matter.<<<<<
What is new, is that you can export these strings to a spreadsheet, and import them from the spreadsheet and it will dynamically be added. [00:11:04](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m04s) I am going to select a few strings. You do not need to select any of the already translated strings, but if you do, it will also be used if it does not really matter.
I'm just going to select a few. Click export data. This will create an Excel Spreadsheet, [00:11:32](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m32s) which you can then save. I have open the spreadsheet and you will see that it has a bunch of IDs, then it has English. It got the tag of the language, and it got the value that we already set. I'm going to set the value for these others in the spreadsheet. You got your Language [00:12:00](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m00s) file back from your translators. They translated it to this column. You can have multiple languages, every language will have its own column.
I am going to select a few and click export data. This will create an Excel Spreadsheet, which you can then save. [00:11:32](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m32s) I have opened the spreadsheet that has a number of IDs, then it has English. It got the tag of the language, and it got the value that we already set. I am going to set the value for these others in the spreadsheet. You got your Language file back from your translators. [00:12:00](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m00s) They translated it to this column (See video). You can have multiple languages, every language will have its own column.
### Important - Top Header Is Language Tag/Langauge Is Created And Published
[00:12:13](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m13s)
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 the 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. If you change author, even though the ID remains, the same, it will not find it and it will simply ignore this line.
Ensure that this top header is the language tag. It is important that this language is created and published in your system. Do not let them change the 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 does not exist it will simply ignore it. If you change 'author', even though the ID remains, the same, it will not find it and it will simply ignore this line.
### Demonstration
[00:12:51](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m51s)
In the way I'll demonstrate this is, I'm just going to change Back to having two k's. Save this document [00:13:00](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m00s) and let's go back and import it. The import 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. 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 want to 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 This Column next to the language you do not want to import. Then you click continue. You will now see that it has added translations except for back. At first I didn't 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 would stop at the first failure and not import further. But I've just fixed that and should within the next update this should be resolved.
To demonstrate this, I am going to change the spelling of Back to have two k's. Save this document and go back and import it. [00:13:00](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m00s) The import is simple, just click on Import Data. Then select the file from our system, click Upload File and it should dynamically map the columns in your spreadsheet to the table columns. You would have your language strings if you got multiple language. It should automatically be mapped in. If you have multiple languages and you only want to import 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 This Column' next to the language you do not want to import. Then you click continue. You will now see that it has added translations, except for 'Back'. At first, I did not add these so I had to quickly go and add a little fix to the import. [00:14:06](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m06s) I did not realize that at the moment it would stop at the first failure and not import further. But I have just fixed that and within the next update, this should be resolved.
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 correspond. If we go back to our spreadsheet and fix this little error, and make a little tweak to one of 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) Again Import Data, Browse. You'll see that back is been done. The other one that we also played with was disclosing new. We added the double t there. You are able to export these language strings, translate them in a spreadsheet and easily import that spreadsheet, which would automatically update [00:15:38](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m38s) your values.
The point is once you have imported it, you will see that it has added the translations to those Strings and it is also mapped to the correct language. [00:14:27](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m27s) But 'Back' was not imported because the English string did not correspond. If we go back to our spreadsheet and fix this little error, and make a little tweak to one of the other strings, just for example sake, and then go back and import this file after it has been saved. [00:15:02](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m02s) Again Import Data and Browse. It may be seen that back has been done. The other one that we also played with was 'Close & New'. We added the 'tt' there. You are able to export these language strings, translate them in a spreadsheet and easily import that spreadsheet, which would automatically update your values.
### Changing The Percentage
[00:15:38](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m38s)
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 changing Add Language: 'Select percentage any language should be translated before the system should add the language to the component during compilation'. [00:16:12](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m12s) 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. That is giving you a quick demonstration of the new Import/Export Option in translating the strings in your system and knowing that if you have translated any of these strings, [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.
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 change Add Language: 'Select percentage any language should be translated before the system should add the language to the component during compilation'. [00:16:12](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m12s) 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. That is giving you a quick demonstration of the new Import/Export Option in translating the strings in your system and knowing that if you have translated any of these strings, [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.