phplocaleojs

How to Identify current locale in a site


I am using OJS cms, which is a Open Journals System. I want to add some parts to registration page. In registration page I want to know what language/locale is set, in order to put some more fields if specific language/locale is set.

I want current locale of the site. How can I recognize what locale is set by user by if statement? I searched stackoverflow but and found some result but non of them were helpful for me.

By the way, this cms is written by PHP. For more inforemation click here.


Solution

  • The best way is to use {$currentLocale}. It tells us what language the website is set in.