Updated 035 Translation Mananger in JCB explained (markdown)

Amigo 2019-07-23 12:41:50 +02:00
parent dd1e11c80d
commit e185a275ef
1 changed files with 1 additions and 1 deletions

@ -31,7 +31,7 @@ Your language tags need to be in accordance with the correct prefixes used in Jo
[00:03:50](https://www.youtube.com/watch?v=zzAcVkn_cWU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m50s)
In the code the following takes place. In the 'a_Get.php' class, is a function called 'setLangStrings'. It gets the content from wherever JCB is handing it and it parses it to see whether it has either this'sprintf' language string or that one'Jtext'. It does some gymnastics to grab all the actual strings into an array. Then it parses this array. Once it has it, it converts it to a language string, and adds it back into the content and returns the content.[00:04:34](https://www.youtube.com/watch?v=zzAcVkn_cWU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m34s) With this object array, it is adding the language string, and the language key to the 'langContent' array. So that is a first thing, this 'langContent' array which is all over the place and it just gets bulkier. The 'lang' is basically the target. [00:05:04](https://www.youtube.com/watch?v=zzAcVkn_cWU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m04s) It is the area which this 'lang' strings belong to, either the Site or the Site system or the Admin or the Admin system area. There are also such a thing as both while JCB compiles. Some strings, it knows must go to both. This 'keyLang' is the actual language string, the capitalized string, which is generated up here(see video).<<<<<,
In the code the following takes place. In the 'a_Get.php' class, is a function called 'setLangStrings'. It gets the content from wherever JCB is handing it and it parses it to see whether it has either this 'sprintf' language string or that one 'Jtext'. It does some gymnastics to grab all the actual strings into an array. Then it parses this array. Once it has it, it converts it to a language string, and adds it back into the content and returns the content.[00:04:34](https://www.youtube.com/watch?v=zzAcVkn_cWU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m34s) With this object array, it is adding the language string, and the language key to the 'langContent' array. So that is a first thing, this 'langContent' array which is all over the place and it just gets bulkier. The 'lang' is basically the target. [00:05:04](https://www.youtube.com/watch?v=zzAcVkn_cWU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m04s) It is the area which this 'lang' strings belong to, either the Site or the Site system or the Admin or the Admin system area. There are also such a thing as both while JCB compiles. Some strings, it knows must go to both. This 'keyLang' is the actual language string, the capitalized string, which is generated up here(see video).<<<<<,
[00:05:34](https://www.youtube.com/watch?v=zzAcVkn_cWU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m34s) I trimmed and placed in it's place. This array gets placed into the files at a certain point. That point is very much at the very end of the compilation when everything is being done. We actually get to the place where [00:05:58](https://www.youtube.com/watch?v=zzAcVkn_cWU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m58s) we going to add two strings to the files.