kernel/private/classes/ezplanguageswitcher.php
File containing the ezpLanguageSwitcher class
- Copyright
- Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.
- License
- eZ Business Use License Agreement Version 2.0
- Package
- kernel
- Version
- 4.6.0
\ezpLanguageSwitcher
Utility class for transforming URLs between siteaccesses.
This class will generate URLs for various siteaccess, and translate URL-aliases into other languages as necessary.
- Parent(s)
- \ezpLanguageSwitcherCapable
Properties
Methods


isLocaleAvailableAsFallback(
)
:
bool
Checks if the current content object locale is available in destination siteaccess.
This is used to check whether we should pass on the original URL to the destination translation siteaccess, when no translation of an object exists in the destination locale.
If the current content object locale exists as a fallback in the destination siteaccess, the original URL should be available there as well.
Type | Description |
---|---|
bool |


isUrlPointingToModule(
string $url
)
:
bool
Checks if the given $url points to a module.
We use this method to check whether we should pass on the original URL to the destination translation siteaccess.
Name | Type | Description |
---|---|---|
$url | string |
Type | Description |
---|---|
bool |


process(
)
:
void
This is a hook which is called by the language switcher module on implementation classes.
In this implementation it is doing initialisation as an example.


setDestinationSiteAccess(
string $saName
)
:
void
Sets the siteaccess name, $saName, we want to redirect to.
Name | Type | Description |
---|---|---|
$saName | string |


setupTranslationSAList(
string $url
=
null
)
:
void
Creates an array of corresponding language switcher links and logical names.
This mapping is set up in site.ini.[RegionalSettings].TranslationSA. The purpose of this method is to assist creation of language switcher links into the available translation siteaccesses on the system.
This is used by the language_switcher template operator.
Name | Type | Description |
---|---|---|
$url | string |