change the add page caption with two language project

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
SOHIB
User
Posts: 112

change the add page caption with two language project

Post by SOHIB »

Hi,
i am using tow language in my project, when i use this code :

if (CurrentPageID()=="add")
 {
	$this->setTablePhrase("fees", "tblCaption", "اضافة رسوم");
}

it work fine but it work with arabic language
how i can add same line for english language


arbei
User
Posts: 9862

Post by arbei »

You may check the CurrentLanguageID(), which is a global function.


SOHIB
User
Posts: 112

Post by SOHIB »

thanks for replay could you please write me the full code
where i can find the language ID?


mobhar
User
Posts: 11922

Post by mobhar »

For example:

if (CurrentPageID() == "add") {
    if (CurrentLanguageID() != "en-US") { // assume you use English and Arabic languages
        $this->setTablePhrase("fees", "tblCaption", "اضافة رسوم");
    } else {
        $this->setTablePhrase("fees", "tblCaption", "Your Caption");
    }
}

SOHIB
User
Posts: 112

Post by SOHIB »

Thank you so much , it is clear and it is working properly


Post Reply