Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | List of all members
eZ\Publish\API\Repository\LanguageResolver Interface Reference

Resolve language settings for Repository layer. More...

Inheritance diagram for eZ\Publish\API\Repository\LanguageResolver:

## Public Member Functions
| setContextLanguage (?string $contextLanguage)
| For use by custom events / logic setting language for all retrieved objects from repository. More...
| getPrioritizedLanguages (?array $forcedLanguages=null)
| Get prioritized languages taking into account forced, context, and configured languages. More...
| getUseAlwaysAvailable (?bool $forcedUseAlwaysAvailable=null)
| Get currently set UseAlwaysAvailable. More...
| getShowAllTranslations (?bool $forcedShowAllTranslations=null)
| Get currently set showAllTranslations. More...
| setShowAllTranslations (bool $defaultShowAllTranslations)
| For use by event listening to config resolver scope changes (or other event changing configured languages). More...
| setDefaultUseAlwaysAvailable (bool $defaultUseAlwaysAvailable)
| For use by event listening to config resolver scope changes (or other event changing configured languages). More...

## Detailed Description

Resolve language settings for Repository layer.

Definition at line 14 of file Publish/API/Repository/LanguageResolver.php.

## Member Function Documentation

## ◆ getPrioritizedLanguages()

eZ\Publish\API\Repository\LanguageResolver::getPrioritizedLanguages | ( | ?array | $forcedLanguages = `null` | ) |

Get prioritized languages taking into account forced, context, and configured languages.

Parameters

  array | null | $forcedLanguages | Optional, typically arguments provided to API, will be used first if set.

Returns
  string[]

Implemented in eZ\Publish\Core\Repository\SiteAccessAware\Language\AbstractLanguageResolver.

## ◆ getShowAllTranslations()

eZ\Publish\API\Repository\LanguageResolver::getShowAllTranslations | ( | ?bool | $forcedShowAllTranslations = `null` | ) |

Get currently set showAllTranslations.

Parameters

  bool | null | $forcedShowAllTranslations | Optional, if set will be used instead of configured value, typically arguments provided to API.

Returns
  bool

Implemented in eZ\Publish\Core\Repository\SiteAccessAware\Language\AbstractLanguageResolver.

## ◆ getUseAlwaysAvailable()

eZ\Publish\API\Repository\LanguageResolver::getUseAlwaysAvailable | ( | ?bool | $forcedUseAlwaysAvailable = `null` | ) |

Get currently set UseAlwaysAvailable.

Parameters

  bool | null | $forcedUseAlwaysAvailable | Optional, if set will be used instead of configured value, typically arguments provided to API.

Returns
  bool

Implemented in eZ\Publish\Core\Repository\SiteAccessAware\Language\AbstractLanguageResolver.

## ◆ setContextLanguage()

eZ\Publish\API\Repository\LanguageResolver::setContextLanguage | ( | ?string | $contextLanguage | ) |

For use by custom events / logic setting language for all retrieved objects from repository.

If set, user (context) language will be prepended to a list of configured prioritized languages.

Languages forced by PHP API consumer when retrieving Repository objects will still take priority, setting both context language and prioritized languages list as a fallback.

Parameters

  string | null | $contextLanguage |

Implemented in eZ\Publish\Core\Repository\SiteAccessAware\Language\AbstractLanguageResolver.

## ◆ setDefaultUseAlwaysAvailable()

eZ\Publish\API\Repository\LanguageResolver::setDefaultUseAlwaysAvailable | ( | bool | $defaultUseAlwaysAvailable | ) |

For use by event listening to config resolver scope changes (or other event changing configured languages).

Parameters

  bool | $defaultUseAlwaysAvailable |

Implemented in eZ\Publish\Core\Repository\SiteAccessAware\Language\AbstractLanguageResolver.

## ◆ setShowAllTranslations()

eZ\Publish\API\Repository\LanguageResolver::setShowAllTranslations | ( | bool | $defaultShowAllTranslations | ) |

For use by event listening to config resolver scope changes (or other event changing configured languages).

Parameters

  bool | $defaultShowAllTranslations |

Implemented in eZ\Publish\Core\Repository\SiteAccessAware\Language\AbstractLanguageResolver.

The documentation for this interface was generated from the following file:

- Publish/API/Repository/LanguageResolver.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.