Info Panel
Roll it!   ⇔
1 - Documantation
* Knowledge Base
  • Mvc
  • Application
  • Advanced
  • Operators
  • Api
* Origin Template
  • Customize
* Core Classes
* Classes

* all grey titles exists but not documented yet

Get Current Language For Urls

Type: core

Class: Lang

Platform: 2v

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):
Code:
Possible outcome (example):
Output:
example: 2
If our current language is "jp" and default language is "en".
How to call (example):
Code:
Possible outcome (example):
Output:
Info Panel
Roll it!   ⇔