Store
Community Documentation

v3 Knowledgebase

Using phrase manager and var-name

The phrase manager will help you to use just a varname instead the complete text and the varname content could be translated into different languages

In this example, I will use a variable in terms and conditions it would help me to translate the content in diferent idioms

Steps to add the var-name

1) Just go to admincp -> Extension -> Language -> Add Phrase, in phrase form fill the field:

Product: phpfox
Module: page (could be other module)
Varname: terms (name of the varname)

See screen-shot #1

In the idioms's field to write the terms and condition for each language.

2) When you have added the phrase you will get the varialname, in this example is "page.terms".
To use this phrase with PHP language use the following Phpfox::getPhrase('page.terms')
See screen-shot #2

3) Go to Admincp -> CMS -> Page -> Manage Pages, in action select the option "edit".
See screen-shot #3

4) In Page Data add the PHP code with the varname:

{php}
echo Phpfox::getPhrase('page.terms');
{/php}

See screen-shot #4

5) Click on submit.