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.

Attached Files

  • 4.png (21.95 kb, 1 views)
  • 3.png (39.06 kb, 0 views)
  • 2.png (38.78 kb, 0 views)
  • 1.png (22.19 kb, 1 views)

Comments
Only verified clients can post comments on our community. If you have any questions feel free to contact us here.
Linus wrote at June 17, 2011, 11:38 pm
0 Votes

How to use translation variables inside js files?

Linus
GillM wrote at April 8, 2011, 9:37 am
0 Votes

Where are the screenshots?

GillM
EricMart wrote at June 22, 2011, 6:01 pm
0 Votes

screen-shots attached

EricMart
complexi wrote at February 19, 2011, 5:13 am
0 Votes

phrase manager doesn't work in input tags:

<input type="text" name="val<city_location>" id="city_location" value="{phrase var='business.type_in_a_city'}" size="30" />.

what variable do i need to use?

john

complexi