[ Index ]

PHP Cross Reference of MantisBT

title

Body

[close]

/core/ -> lang_api.php (summary)

Language (Internationalization) API

Copyright: Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
Copyright: Copyright (C) 2002 - 2011 MantisBT Team - mantisbt-dev@lists.sourceforge.net
File Size: 404 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 11 functions

  lang_load()
  lang_get_default()
  lang_map_auto()
  lang_ensure_loaded()
  lang_language_exists()
  lang_push()
  lang_pop()
  lang_get_current()
  lang_get()
  lang_exists()
  lang_get_defaulted()

Functions
Functions that are not part of a class:

lang_load( $p_lang, $p_dir = null )   X-Ref
Loads the specified language and stores it in $g_lang_strings, to be used by lang_get

param: string $p_lang
param: string $p_dir
return: null

lang_get_default()   X-Ref
Determine the preferred language

return: string

lang_map_auto()   X-Ref

return: string

lang_ensure_loaded( $p_lang )   X-Ref
Ensures that a language file has been loaded

param: string $p_lang the language name
return: null

lang_language_exists( $p_lang )   X-Ref
Check if the given language exists

param: string $p_lang the language name
return: boolean

lang_push( $p_lang = null )   X-Ref
language stack implementation
push a language onto the stack

param: string $p_lang
return: null

lang_pop()   X-Ref
pop a language onto the stack and return it

return: string

lang_get_current()   X-Ref
return value on top of the language stack
return default if stack is empty

return: string

lang_get( $p_string, $p_lang = null, $p_error = true )   X-Ref
Retrieves an internationalized string
This function will return one of (in order of preference):
1. The string in the current user's preferred language (if defined)
2. The string in English

param: string $p_string
param: string $p_lang
param: bool $p_error default: true - error if string not found
return: string

lang_exists( $p_string, $p_lang )   X-Ref
Check the language entry, if found return true, otherwise return false.

param: string $p_string
param: string $p_lang
return: bool

lang_get_defaulted( $p_string, $p_default = null, $p_lang = null )   X-Ref
Get language:
- If found, return the appropriate string (as lang_get()).
- If not found, no default supplied, return the supplied string as is.
- If not found, default supplied, return default.

param: string $p_string
param: string $p_default
param: string $p_lang
return: string



Generated: Thu Jul 28 15:48:31 2011 Cross-referenced by PHPXref 0.7