Page 1 of 1

Where does $language originate from?

Posted: Thu Apr 15, 2021 2:47 pm
by cobber
Have been looking at a couple of themes to get a handle on developing my own themes and noticed a variable named $language.

Does anyone know where this originates from?

I see it takes a parameter of text to be used as an output for the search bar but wanted to know more about any additional parameters or methods possibly associated with the variable.

eg: $langauge->p('search')

Re: Where does $language originate from?

Posted: Fri Apr 16, 2021 6:50 pm
by Edi
$language->p('search') is taken from the translation files in the directory /language of the plugin Search depending of the selected language of the installation.

If the word or its translation is used by the plugin itself it would be $L->get('Search').