I
I
Ivan Fotiev2015-11-10 17:28:21
PHP
Ivan Fotiev, 2015-11-10 17:28:21

How to connect lang files to a regular php file?

Hello, there was a need to output information from a lang file to a regular php file. The files are in the root directory. How to create lang files for it correctly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Valera Karmanov, 2015-11-11
@motokraft

Depending on what will be there ... If they look like ordinary language files, for example,
then you can display them like this ...

$lang = parse_ini_file($_SERVER['DOCUMENT_ROOT']."/lang.ini");
echo $lang['LANG_TEXT'];

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question