Get Current Language For Urls
Function: getCurrentLanguageForUrls
Visibility: public static
Parameter: getCurrentLanguageForUrls($language)
Description:
Will return the correct language code of the current site language state, to put in urls. If we are using the default language it will rerutn blank.
Parameters:
(optional) - string|null - language - Set certain language in url.
Return:
string - The language code plus "/" or "." sign, according to lang/parameters/route.
Callable from (extended classes):
application: controller,view
advanced: controller,view
operators: controller,view
api: controller,view
example: 1
If our current language is "en" and default language is "en".
How to call (example):
Possible outcome (example):
Output:
example: 2
If our current language is "jp" and default language is "en".
How to call (example):
Possible outcome (example):
Output: