Multilingual __construct(
)
|
|
Protected constructor
API Tags:
boolean findLanguageInString(
$str,
$language
)
|
|
Find a language in a languages string
Parameters:
API Tags:
| Return: | true if the language is found |
| Access: | public |
void fixLanguageUri(
$language,
$uri, [
$absolute = false]
)
|
|
Fix the language URI
Parameters:
|
|
$language: |
|
|
|
$uri: |
|
|
|
$absolute: |
|
API Tags:
PivotX configuration Tab
API Tags:
string getContentLanguage(
)
|
|
Get the main content language
API Tags:
| Return: | get the main content language |
| Access: | public |
array getContents(
mixed
$source, [string
$language = false]
)
|
|
Get the 'contents' from a particular source
Magically detects the source kind and load the contents
Parameters:
|
mixed |
$source: |
any source |
|
string |
$language: |
specific language variant of the page you want |
API Tags:
| Return: | array($type,$contents,$havelanguage) - type, type of contents (entry, page, oops_record)
- contents, usually array of contents
- havelanguage, true if contents is actually in the requested language
|
| Access: | public |
string getCurrentLanguage(
)
|
|
Return the current language
API Tags:
| Return: | the current language |
| Access: | public |
string getDefaultLanguage(
)
|
|
Return the default language
API Tags:
| Return: | the default language |
| Access: | public |
void getHomeUri(
$language
)
|
|
Get the URI to the homepage of the language
(derived from url patterns)
Parameters:
API Tags:
Return the configured languages
API Tags:
| Return: | configured languages |
| Access: | public |
string getLocaleForLanguage(
[string
$language = false]
)
|
|
Get the defined locale for language
Parameters:
|
string |
$language: |
language string or false for default |
API Tags:
| Return: | defined locale or false |
| Access: | public |
void getPageUri(
$language
)
|
|
Get the current page-uri
Parameters:
API Tags:
string getRequestedLanguage(
)
|
|
Use various methods to detect the requested language
API Tags:
| Return: | the detected language |
| Access: | public |
void getUriPostfix(
$content
)
|
|
Parameters:
API Tags:
void getUriPrefix(
$content,
$language
)
|
|
Parameters:
API Tags:
void handleWrongEntryUrl(
&$page,
$language
)
|
|
Handle a wrong entry url
Parameters:
API Tags:
void handleWrongPageUrl(
&$page,
$language
)
|
|
Handle a wrong page url
Parameters:
API Tags:
Singleton return instance method
API Tags:
boolean isDefaultLanguage(
[string
$language = false]
)
|
|
Check if the parameter is the default language
Parameters:
|
string |
$language: |
test this language |
API Tags:
| Return: | true if the given language is the default |
| Access: | public |
Return multilingual status
API Tags:
| Return: | returns true if multilingual is enabled |
| Access: | public |
string isLatestContentLanguageAlsoRequested(
)
|
|
Get the latest content language
API Tags:
| Return: | get the main content language |
| Access: | public |
mixed makeLink(
mixed
$source, [string
$language = false], [
$default = false], [
$ignore_shave = false]
)
|
|
Make link to any source kind
Magically detects the source kind and create the proper link to then language you want.
Parameters:
|
mixed |
$source: |
any source |
|
string |
$language: |
specific language variant of the page you want |
|
|
$default: |
|
|
|
$ignore_shave: |
|
API Tags:
| Return: | valid link or the default specified |
| Access: | public |
mixed makeURI(
mixed
$source, [string
$language = false], [
$default = false]
)
|
|
Make link to any source kind
Magically detects the source kind and create the proper link to then language you want.
Parameters:
|
mixed |
$source: |
any source |
|
string |
$language: |
specific language variant of the page you want |
|
|
$default: |
|
API Tags:
| Return: | valid link or the default specified |
| Access: | public |
void readConfiguration(
)
|
|
API Tags:
void setContentLanguage(
string
$language
)
|
|
Set the main content language
Parameters:
|
string |
$language: |
set this language |
API Tags:
void setCurrentLanguage(
string
$language
)
|
|
Set the current language if valid
Parameters:
|
string |
$language: |
the current language |
API Tags:
void setLatestContentLanguage(
string
$language
)
|
|
Set the latest content language
Parameters:
|
string |
$language: |
set this language |
API Tags:
void setLatestContentLanguageIsDefault(
)
|
|
Set the latest content language to the default language
API Tags:
void setPageUri(
$language,
$uri, [
$fix_host = true]
)
|
|
Store the current page-uri in specific languages
To be used when building the languages array for the templating
Parameters:
|
|
$language: |
|
|
|
$uri: |
|
|
|
$fix_host: |
|
API Tags: