Class: Language

Source Location: /CORE/system/classes/language/Language.php

Class Language

Class Overview

This represents a Language.

Located in /CORE/system/classes/language/Language.php [line 36]



		
				Author(s):
		
  • Kevin Papst
Information Tags:
Version:  $Id: Language.php,v 1.15 2008/07/11 20:41:41 kpapst Exp $
Copyright:  Copyright (C) Kevin Papst
License:  GNU Public License

Methods

[ Top ]
Method Summary
Language   Language()   Loads the specfied Language by its Locale.
String   getCharset()   Returns the Character Set this Language uses.
String   getDefaultLanguageName()   Returns the default Name of this Language, normally the Name of the Language written in the language itself.
String   getFullLocale()   Might returns the same as
  1. getLocale()
, but can return a longer version, like locale_Country.
String   getID()   Returns the ID of this Language.
void   getLanguageID()  
String   getLanguageName()   Returns the Name of this Language in the requested Locale.
String   getLocale()   Returns the Locale of this Language.
String   getName()  
void   getShortLocale()  
String   getTranslation()   Get the translation Key for this Language.
boolean   isAdminLanguage()   Returns whether this Language can be used to display the Administration.
boolean   isValid()   Returns whether this language is valid.
void   toString()   Returns the Locale.

[ Top ]
Methods
Constructor Language  [line 47]

  Language Language( locale $locale  )

Loads the specfied Language by its Locale.

Parameters:
locale   $locale:  the Language Locale


[ Top ]
getCharset  [line 159]

  String getCharset( )

Returns the Character Set this Language uses.

This is normally the HTML encoding used in the Browser.


API Tags:
Return:  the encoding to use for this language


[ Top ]
getDefaultLanguageName  [line 118]

  String getDefaultLanguageName( )

Returns the default Name of this Language, normally the Name of the Language written in the language itself.


API Tags:
Return:  the default Name of the Language


[ Top ]
getFullLocale  [line 150]

  String getFullLocale( )

Might returns the same as

  1. getLocale()
, but can return a longer version, like locale_Country.


API Tags:
Return:  the Full Locale of this Language


[ Top ]
getID  [line 87]

  String getID( )

Returns the ID of this Language.

Better try to use

instead, cause Locales are System independent.


API Tags:
Return:  the Language Locale


[ Top ]
getLanguageID  [line 95]

  void getLanguageID( )


API Tags:
See:  Language::getLocale()
Deprecated:  use
instead.


[ Top ]
getLanguageName  [line 105]

  String getLanguageName( [ $locale = '']  )

Returns the Name of this Language in the requested Locale.

If no Locale is passed, the current User Locale is used! See

  1. _ULC
.

Parameters:
   $locale: 

API Tags:
Return:  the Language name


[ Top ]
getLocale  [line 134]

  String getLocale( )

Returns the Locale of this Language.


API Tags:
Return:  the Locale of this Language


[ Top ]
getName  [line 126]

  String getName( [ $locale = '']  )

Parameters:
   $locale: 

API Tags:
Return:  the Language name
See:  Language::getLanguageName()


[ Top ]
getShortLocale  [line 141]

  void getShortLocale( )


API Tags:
See:  Language::getLocale()


[ Top ]
getTranslation  [line 168]

  String getTranslation( )

Get the translation Key for this Language.

Use this methods result for loading Language Files.


API Tags:
Return:  the Identifier to load Language Files for


[ Top ]
isAdminLanguage  [line 177]

  boolean isAdminLanguage( )

Returns whether this Language can be used to display the Administration.


API Tags:
Return:  if this Lanugage has Core translations for the Admin Panel


[ Top ]
isValid  [line 79]

  boolean isValid( )

Returns whether this language is valid.



[ Top ]
toString  [line 184]

  void toString( )

Returns the Locale.



[ Top ]