Blesta
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • blesta
    • app
      • controllers
      • models
    • components
      • areyouahuman
      • auth
        • motp
        • oath
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • events
        • default
      • exchange
        • rates
          • google
            • finance
          • yahoo
            • finance
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
          • quickbooks
            • invoice
      • json
      • modules
      • net
        • amazon
          • s3
        • http
        • net
          • geo
            • ip
      • plugins
      • recaptcha
      • reports
        • aging
          • invoices
        • custom
          • report
        • invoice
          • creation
        • tax
          • liability
        • transactions
          • applied
          • received
      • security
      • session
        • cart
      • settingscollection
      • upgrades
        • tasks
      • upload
      • vcard
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
      • widget
        • client
  • minPHP
    • components
      • input
      • record
    • helpers
      • color
      • data
        • structure
      • date
      • form
      • html
      • javascript
      • xml
    • lib
  • None
  • PHP

Classes

  • Cache
  • Configure
  • Controller
  • Dispatcher
  • Language
  • Loader
  • Model
  • Router
  • View

Exceptions

  • UnknownException

Class Language

Provides a set of static methods to aid in the use of multi-language support. Supports the use of multiple simultaneous languages, including a default (fallback) language. When the definition can not be found in the set of primary keys, the default is used instead.

This class makes use of the following Configure class options:

Language.default - Defines the default (fallback) language (ISO 639-1/2) e.g. "en_us" Language.allow_pass_through - true/false allows keys without a definition to be passed through

Direct known subclasses

View

Package: minPHP\lib
Located at lib/language.php

Methods summary

final public static
# _( string $lang_key, boolean $return = false )

Alias of Language::getText()

Alias of Language::getText()

Parameters

$lang_key
string
$lang_key The language key identifier for this requested text
$return
boolean
$return Whether to return the text or output it

See

Language::getText()
final public static
# getText( string $lang_key, boolean $return = false )

Fetches text from the loaded language file. Will search the preferred language file first, if not found in there, then will search the default language file for the $lang_key text.

Fetches text from the loaded language file. Will search the preferred language file first, if not found in there, then will search the default language file for the $lang_key text.

Parameters

$lang_key
string
$lang_key The language key identifier for this requested text
$return
boolean
$return Whether to return the text or output it
final public static
# loadLang( mixed $lang_file, string $language = null, string $lang_dir = LANGDIR )

Loads a language file whose properties may then be invoked.

Loads a language file whose properties may then be invoked.

Parameters

$lang_file
mixed
$lang_file A string as a single language file or array containing a list of language files to load
$language
string
$language The ISO 639-1/2 language to load the $lang_file for (e.g. en_us), default is "Language.default" config value
$lang_dir
string
$lang_dir The directory from which to load the given language file(s), defaults to LANGDIR
final public static string
# setLang( string $language )

Sets the language to load when not explicitly defined in the requested method

Sets the language to load when not explicitly defined in the requested method

Parameters

$language
string
$language The ISO 639-1/2 language to use (e.g. en_us) for all future requests if not explicitly given to the requested method

Returns

string
The previously set language, null if not previously defined

Magic methods summary

Blesta API documentation generated by ApiGen 2.8.0