CoreAPI
[ class tree: CoreAPI ] [ index: CoreAPI ] [ all elements ]

Procedural File: lang_api.php

Source Location: /core/lang_api.php



Page Details:

Language (Internationalization) API



Tags:

copyright:  Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
copyright:  Copyright (C) 2002 - 2010 MantisBT Team - mantisbt-dev@lists.sourceforge.net
link:  http://www.mantisbt.org
usedby:  ajax_api.php
usedby:  html_api.php
usedby:  BugData::create()








lang_ensure_loaded [line 167]

null lang_ensure_loaded( string $p_lang)

Ensures that a language file has been loaded



Parameters

string   $p_lang   the language name
[ Top ]



lang_exists [line 311]

bool lang_exists( string $p_string, string $p_lang)

Check the language entry, if found return true, otherwise return false.



Parameters

string   $p_string  
string   $p_lang  
[ Top ]



lang_get [line 259]

string lang_get( string $p_string, [string $p_lang = null])

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




Parameters

string   $p_string  
string   $p_lang  
[ Top ]



lang_get_current [line 237]

string lang_get_current( )

return value on top of the language stack

return default if stack is empty




[ Top ]



lang_get_default [line 97]

string lang_get_default( )

Determine the preferred language



[ Top ]



lang_get_defaulted [line 327]

string lang_get_defaulted( string $p_string, [string $p_default = null], [string $p_lang = null])

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.




Parameters

string   $p_string  
string   $p_default  
string   $p_lang  
[ Top ]



lang_language_exists [line 181]

boolean lang_language_exists( string $p_lang)

Check if the given language exists



Parameters

string   $p_lang   the language name
[ Top ]



lang_load [line 42]

null lang_load( string $p_lang, [string $p_dir = null])

Loads the specified language and stores it in $g_lang_strings, to be used by lang_get



Parameters

string   $p_lang  
string   $p_dir  
[ Top ]



lang_map_auto [line 126]

string lang_map_auto( )



[ Top ]



lang_pop [line 226]

string lang_pop( )

pop a language onto the stack and return it



[ Top ]



lang_push [line 193]

null lang_push( [string $p_lang = null])

language stack implementation

push a language onto the stack




Parameters

string   $p_lang  
[ Top ]



Documentation generated on Sun, 12 Dec 2010 23:50:34 +0900 by phpDocumentor 1.4.3
inserted by FC2 system