Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Some Note about Phrases System from 4.5.0

  • Deprecating  function: Phpfox::getPhrase. On version 4.5.0, you can use this function, but it will be removed completely from 4.6.0.
  • Have to define phrase before use.
  • Define and use:
  1. How to to define:

Add file phrase.json on root path of your apps.

Example:

phrase.json
{ 
     "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:

  • Easies define: Put phrase on key, put blank on value (of json).

Example:

Easiest define
{ 
     "Manage Video" : "" 
} 

Use:

Easiest define - Using
<?php
echo _p("Manage Video"); 

It will show: Manage Video

  • Var name define: Put var_name on key, put phrase on value (of json).

Example:

Easiest define
{ 
     "manage_video" : "Manage Video" 
} 

Use:

Easiest define - Using
<?php
echo _p("manage_video"); 

It will show: Manage Video


  • No labels