Language Url Start
Function: languageUrlStart
Visibility: public static
Parameter: languageUrlStart($language,$nodomain)
Description:
Create's the start of the url given the language. Considering the language configuration - With this function you don't have to worry about links that won't match the language.
Parameters:
(optional) - string - $directory - The directory to make an url.
(optional) - bool|false - $noDomain - Decides if we want to include the domain of the site.
Return:
string - The url. If multi language and language is set, then the result url will contain it's language.
Callable from (extended classes):
application: controller,view
advanced: controller,view
operators: controller,view
api: controller,view
example: 1
Let's say that we want the start of the url in german, the outcome will present the 2 letter language code in the url.
How to call (example):
Possible outcome (example):
Output:
example: 2
Let's say that we want only the basic domain without any language.
How to call (example):
Possible outcome (example):
Output: