Detect Languages From Browser
Function: detectLanguagesFromBrowser
Visibility: public static
Parameter: detectLanguagesFromBrowser($statisticInfo)
Description:
Will detect the user languages - Helps to deside which content to display the user.
Parameters:
(optional) - bool|false - $statisticInfo - If true will return statistic info about the languages, if not, only the languages will be returned as array.
Return:
array - The list of the languages the user is using.
Callable from (extended classes):
application: controller,view
advanced: controller,view
operators: controller,view
api: controller,view
example: 1
We can offer the user to choose viewing the page in his own languages.
How to call (example):
Possible origin state (example):
State:
Possible outcome (example):
Output:
example: 2
We can get the languages of the user with it's statistics too.
How to call (example):
Possible origin state (example):
State:
Possible outcome (example):
Output: