Tip:
Highlight text to annotate it
X
Hello and welcome to another episode of Transposh TV
In this episode we are going to explain shortly about shortcodes
So what are shortcodes?
We have here the documentation for the shortcodes that are used in Transposh
Those are small tags that you can add in your wordpress post
You add some options to the transposh parser
regarding the language used regarding what to display, what to translate and what is generated
What we will actually do in this video is take the documentation from here and explain what happens in each and every sample
So lets create a new post
Hello Shortcodes
Pasting the documentation parts
And we'll leave just the examples themselves
We could have prepared in advance but we wanted to show you how its done on the fly
Lets go over the examples that are here
Here we have a shortcode that actually says that the following phrase is a Spanish one, 'hola'
Hola means Hello, so we properly mark in in Spanish
And we'll see what happens
Now we have a pharse that is marked as a Spanish pharse
And have the added parameter of "only"
This actually means that it will only be shown to users that have selected Spanish as their langauge
Here we have another phrase, this phrase is in Hebrew
But it will not be displayed to users that have Spanish or French
Or we can simply have an English Pharse that will not be displayed to French and Spanish
We also have here an example of how to do it properly
Let's say we have a good translation of a complete phrase
... Complete segment probably
We can mark the original not to be displayed in a certain language
And the translation can be marked as in that language and only for that language
So Hello is Hola in Spanish and we don't need to translate this anymore
And we have the ability to select the "no_translate" tag
The "no_translate" tag means that the phrase will not be translated at all
This is good for company names or things that are global in nature
So lets hit publish and see what happens
We are going to the homepage
Ok, lets go to the post
We see here, Hello, not in Spanish or French, Hebrew
Not in French and Spanish, hello, and a not translated at all
We are in English but we can edit translation
Hello is originally Hola, this one is Originally in Hebrew
This is English and as we can see it has the break
This is originally in Spanish, marked as Spanish
ok, we'll continue, this is not translated at all and we can't edit it at all
Now lets go to Spanish
What we can see, we can see here a couple of new stuff, we see that we now see the "Hola Espaniol"
This segment was marked just for Spanish users
We also don't see the segments in Hebrew and English that were marked not for Spanish users
We also see that the Hola which is the Translation of Hello is displayed and is not editable, because originally its in Spanish
So there's no need to edit it
We can do some really neat stuff with those shortcodes
Most of this stuff was previously also available in classes such as the no_translate class, and support to other stuff like the lang tag which we were able to use
And we hope you will enjoy this version that now includes the shortcodes in the tp tag
Its transposh 0.7.3, bye! and thanks for watching