com.tle.web.scripting.advanced.objects
Interface RegionalScriptObject
Declaration: public interface RegionalScriptObject extends ScriptObject
All Superinterfaces: ScriptObject, java.io.Serializable

 

Referenced by the 'lang' variable in script. Locale, Language and TimeZone functions are all relative to the current user.

 

 

Fields Summary
static java.lang.String DEFAULT_VARIABLE
    

 

 

Methods Summary
abstract java.util.Locale getLocale()
    
Gets the current user's locale based on: (in this order) - the user's preference (in "edit my details") - the user's browser setting - the default for the server
abstract java.lang.String getString(java.lang.String key)
    
Get a language string from the language pack from it's key value.
abstract java.util.TimeZone getTimeZone()
    
Gets the current user's time zone based on: (in this order) - the user's preference (in "edit my details") - the institution default - the default for the server

 

Methods inherited from interface: com.tle.common.scripting.ScriptObject
scriptEnter, scriptExit

 

 

 

 

DEFAULT_VARIABLE

 

public static final java.lang.String DEFAULT_VARIABLE

 

See also: Constants

 

 

 

 

getString

 

public abstract java.lang.String getString( java.lang.String key)

 

Get a language string from the language pack from it's key value.

 

Parameters:
key-
The key of the string
Returns:
The value of the string (if any)

 

 

 

getLocale

 

public abstract java.util.Locale getLocale( )

 

Gets the current user's locale based on: (in this order) - the user's preference (in "edit my details") - the user's browser setting - the default for the server

 

Returns:
A java.util.Locale object

 

 

 

getTimeZone

 

public abstract java.util.TimeZone getTimeZone( )

 

Gets the current user's time zone based on: (in this order) - the user's preference (in "edit my details") - the institution default - the default for the server

 

Returns:
A java.util.TimeZone object