Localization
PHPLanguages using 'gettext'
The 'gettext' is a PHP extension, which is responsible for app localizing, depending on where the user lives. You can use JSON to make key value pairs manually, but its a more time-taking approach and not as automatic as using the '.po' file system. '.po' extension are specifically made for preferred language workflows:
This tutorial can help you setup a PHP localization application that works with gettext. This way you can translate strings to code.
Array-Based Internationalization
This is much simpler approach to translating languages. You would create JSON files for every language and set key pairs to make this work:
If an user were to put "?lang=es" in URL, then the text in website would change to Spansh. Else, if no specificity in URL, return back to English.
URL-Based Locale
This method is just like the previous technique, where you would type the language's 2 letters into URL and text gets changed. This one just uses a different way to maintain Localization:
Works just like the "Array-Based Internationalization" system, but uses a different method of using different languages -> this one's URL looks like this for example -> "example.com/en/page.php".