Language Translation in PHP

This tutorials is about translating the language in php. This will require when you are creating the multi language projects. Language translation is simple logic behind that just storing the values in session when some user change according the that needs then we are define that values and store the value in variable and change the values.

lang is directory name inside the language variable define the another directory like

-lang
-en
-ar

library.php

Now create the index.php file to get the idea how that language is going to be change see below code.

index.php

All the variable is define inside the both directory like er and en for example.