Logo

Docs

  • HOME

Class: I18n

I18n

new I18n()

Create a new instance of I18N
Properties:
Name Type Description
links Array Contains the array of links
designerDico JSON Object containing the standard library structure
dicos Array Contains the array of applications
dicoUrl String Contains the Url of the dico(Internal Use)
createUrl String Contains the Url for the creation of dicos(Internal Use)
Source:
  • i18n/I18n.js, line 60
See:
  • ProjectApp
  • Resource
Examples
Load i18n from app
		function loadI18n(p_app){//App object
			var i18n = p_app.i18n;
            i18n.load({
				onSuccess:function(){
					var dico = i18n.dicos[0];
					alert(i18n.dicos.length);
					i18n.load({
						onSuccess:function(){
							alert("Dico "+dico.name+" loaded!");
						}
					});
				}
			});
		};
	
Load designer Dico from process
		function loadi18n(p){
            var i18n = p.i18n;
            i18n.load({
				onSuccess:function(){
					i18n.loadDesignerDico({
						onSuccess:function(){
							alert(JSON.stringify(i18n.designerDico));
						}
					});
				}
			});
		};

Methods

createDico(options)

Create a new dictionary.
Parameters:
Name Type Description
options object options to be used during the call
Properties
Name Type Argument Description
language String dictionary title
name String dictionary name
onSuccess Resource~onSuccess a callback function called in case of a success
onFailure Resource~onFailure <optional>
a callback function called in case of a failure
baseUrl String <optional>
base URL. If not set the current base URL will be used
Source:
  • i18n/I18n.js, line 188
See:
  • updateI18n
Example
Create i18n library
		function createI18nLib(p_app){
			var i18n = p_app.i18n;
            i18n.load({
				onSuccess:function(){
					i18n.createLib({
						onSuccess:function(){
							alert("Lib "+optLib.language+" created!");
						}
					});				
				}
			});
		};

generateUrl()

Overrides Resource's generateUrl method to return the request url
Source:
  • i18n/I18n.js, line 84
See:
  • Resource#generateUrl

load(options)

Override Resource load method.
Parameters:
Name Type Description
options object options to be used during the call
Properties
Name Type Argument Description
onSuccess Resource~onSuccess a callback function called in case of a success
onFailure Resource~onFailure <optional>
a callback function called in case of a failure
baseUrl String <optional>
base URL. If not set the current base URL will be used
Source:
  • i18n/I18n.js, line 106
See:
  • Resource#load

loadDesignerDico(options)

Load designerDico.
Parameters:
Name Type Description
options object options to be used during the call
Properties
Name Type Argument Description
onSuccess Resource~onSuccess a callback function called in case of a success
onFailure Resource~onFailure <optional>
a callback function called in case of a failure
baseUrl String <optional>
base URL. If not set the current base URL will be used
Source:
  • i18n/I18n.js, line 147
See:
  • Resource#ajaxLoad

loadPreset()

Overrides Resource's loadPreset method.
Source:
  • i18n/I18n.js, line 78
See:
  • Resource#loadPreset

loadSet(rObject)

Overrides Resource's loadSet method to set local variables after request.
Parameters:
Name Type Description
rObject json JSON representation of the loaded data.
Source:
  • i18n/I18n.js, line 94
See:
  • Resource#loadSet

updateI18n(options)

update a i18n with previously set values.
Parameters:
Name Type Description
options object options to be used during the call
Properties
Name Type Argument Description
onSuccess Resource~onSuccess a callback function called in case of a success
onFailure Resource~onFailure <optional>
a callback function called in case of a failure
baseUrl String <optional>
base URL. If not set the current base URL will be used
Source:
  • i18n/I18n.js, line 242
See:
  • Resource#save

Index

Classes

  • AccessLog
  • AllLaneUserList
  • AppInstanceReport
  • Context
  • Customer
  • CustomerDomainList
  • CustomerList
  • CustomerSubscriptionList
  • CustomerTrafficList
  • CustomList
  • CustomListList
  • Domain
  • Host
  • HostList
  • HostMode
  • I18n
  • I18nDico
  • Lane
  • LaneList
  • LanePoolList
  • LogLog
  • Metadata
  • Oauth
  • OauthList
  • Pool
  • PoolList
  • Preferences
  • Process
  • ProcessList
  • Project
  • ProjectAppliQuery
  • ProjectChildList
  • ProjectLaneList
  • ProjectList
  • ProjectProcess
  • ProjectProcessList
  • ProjectProcessQuery
  • ProjectVersion
  • ProjectVersionList
  • Report
  • RequestLog
  • Resource
  • SavedQuery
  • Subscription
  • Token
  • Traffic
  • Usage
  • User
  • UserAccessList
  • UserDelegation
  • UserDelegationList
  • UserLaneList
  • UserList
  • UserRepresentationList
  • UserSupportAuth
  • UserSupportAuthList
  • WebInterface
  • WebInterfaceList

Global

  • context

© Akorbi Digital RMP. All Rights Reserved - Legal terms - Contact