Add file phrase.json on root path of your apps.
Example:
{ "Phrase text" : "", "var_name" : "Phrase text", "Phrase text" : { "en" : "", "es" : "Spanish Phrase text", "ot" : "Other language phrase text" }, "var_name" : { "en" : "Phrase text", "es" : "Spanish Phrase text", "ot" : "Other language phrase text" }, } |
We have 4 ways to define a phrase:
Example:
{ "Manage Video" : "" } |
Use:
<?php echo _p("Manage Video"); |
It will show: Manage Video
Example:
{ "manage_video" : "Manage Video" } |
Use:
<?php echo _p("manage_video"); |
It will show: Manage Video
With way 1 and 2, we will use "Manage Video for all available language on your site. |
Example:
{ "Phrase text" : { "en" : "", "es" : "Spanish Phrase text", "ot" : "Other language phrase text" }, } |
Use:
<?php echo _p("Phrase text"); |
"en": can be missed
Clients' site have to installed language package with id "es", if not, es phrase will by pass. It's the same for other language package.
It will show: Phrase text (if default language of user is en)
It will show: Spanish Phrase text (If default language of users is es)
...
Example:
{ "phrase_text" : { "en" : "Phrase text", "es" : "Spanish Phrase text", "ot" : "Other language phrase text" }, } |
Use:
<?php echo _p("phrase_text"); |
"en": is required (can not be missed)
Clients' site have to installed language package with id "es", if not, es phrase will by pass. It's the same for other language package.
It will show: Phrase text (if default language of user is en)
It will show: Spanish Phrase text (If default language of users is es)
....