InputfieldSelect::optionLanguageLabel() method

Get or set alternative language label(s)

Usage

// basic usage
$string = $inputfieldSelect->optionLanguageLabel($language);

// usage with all arguments
$string = $inputfieldSelect->optionLanguageLabel($language, $key = null, $label = null);

Arguments

NameType(s)Description
languageLanguage, int, string

Language object, id or name (required).

key (optional)string, null, bool

Option key/value to get/set label for, OR omit to return all currently set option language labels for language, OR boolean false to remove all language labels for this option value/key. OR array of [ optionValue => optionLabel ] to add multiple option values for language.

label (optional)

Return value

string array Inputfield

Return value depends on given arguments


InputfieldSelect methods and properties

API reference based on ProcessWire core version 3.0.244

Latest news

  • ProcessWire Weekly #563
    In the 563rd issue of ProcessWire Weekly we will share the latest weekly update from Ryan, as well as the latest news and updates from the ProcessWire community. Read on!
    Weekly.pw / 22 February 2025
  • ProcessWire 3.0.244 new main/master version
    ProcessWire 3.0.244 is our newest main/master/stable version. It's been more than a year in the making and is packed with tons of new features, issue fixes, optimizations and more. This post covers all the details.
    Blog / 18 January 2025
  • Subscribe to weekly ProcessWire news

“…building with ProcessWire was a breeze, I really love all the flexibility the system provides. I can’t imagine using any other CMS in the future.” —Thomas Aull