Docs For Class atkLanguage
Nederlands | English
Atk API home Class tree Element index

Todo list

Packages: » atk Classes: general » AllTests » atkConfig » atkController » atkDataNode » atkErrorHandlerBase » atkFileEditor » atkLanguage » atkMailErrorHandler » atkMetaNode » atkMockNode » atkNode » atkNodeValidator » atkOneToManyRelationSessionGridHandler » atkSessionStore » atkStatementIterator » atkTreeNode » atkWizardBase » atkZendPlatformErrorHandler » clsTbsDataSource » clsTbsLocator » clsTinyButStrong » clsTinyButStrongOOo » FCKeditor » getSupportedLanguagesCollector » layout » node » sql_whereclause_blacklist_checker » test » tree utils » atkAbstractFrame » atkActionListener » atkClassFinder » atkClassLoader » atkCompatSelector » atkDataHolder » atkDebugger » atkDirectoryTraverser » atkEventLog » atkFileUtils » atkFrame » atkFrameSet » atkIpUtils » atkJSON » atkMail » atkMailer » atkMessageQueue » atkMLSelector » atkmlsplitter » atkRootFrameset » atkSelector » atkSelectorIterator » atkString » atkStringParser » atkTableRenderer » atkTableRendererGrouped » atkTextMarker » atkTmpFile » atkTriggerListener » atkYAML » atkZip » browserInfo fixture » atkAbstractFixtureLoader » atkFixtureManager » atkPHPFixtureLoader » atkYAMLFixtureLoader testcases » atkAbstractSearchHandler ui » atkActionBoxBuilder » atkDialog » atkIndexPage » atkOutput » atkPage » atkPageBuilder » atkTheme » atkThemeCompiler » atkUI handlers » atkActionHandler » atkAddHandler » atkAddOrCopyHandler » atkAdminHandler » atkAttributeEditHandler » atkCopyHandler » atkDeleteHandler » atkDocumentHandler » atkEditCopyHandler » atkEditHandler » atkExportHandler » atkFeedbackHandler » atkFileExport » atkImportHandler » atkMultiSelectHandler » atkMultiUpdatehandler » atkSaveHandler » atkSearchHandler » atkSelectHandler » atkSmartSearchHandler » atkUpdatehandler » atkViewEditBase » atkViewHandler » atkXmlHandler attributes » atkAggregatedColumn » atkAttribute » atkBoolAttribute » atkCalculatorAttribute » atkCaptchaAttribute » atkColorPickerAttribute » atkCountryAttribute » atkCreatedByAttribute » atkCreateStampAttribute » atkCurrencyAttribute » atkDateAttribute » atkDateTimeAttribute » atkDocumentAttribute » atkDummyAttribute » atkDurationAttribute » atkEmailAttribute » atkExpressionAttribute » atkFckAttribute » atkFieldSet » atkFileAttribute » atkFileWriterAttribute » atkFlagAttribute » atkFormatAttribute » atkFuzzySearchAttribute » atkHiddenAttribute » atkHtmlAttribute » atkIpAttribute » atkListAttribute » atkLiveTextPreview » atkMlAttribute » atkMlHtmlAttribute » atkMlNumberAttribute » atkMlSelectorAttribute » atkMlTextAttribute » atkMlWrapper » atkMultipleFileAttribute » atkMultiSelectAttribute » atkNumberAttribute » atkParserAttribute » atkPasswordAttribute » atkProfileAttribute » atkRadioAttribute » atkRadioDetailsAttribute » atkRowCounter » atkStateAttribute » atkTabbedPane » atkTagAttribute » atkTextAttribute » atkTimeAttribute » atkTimeZoneAttribute » atkToolbar » atkUpdatedByAttribute » atkUpdateStampAttribute » atkUrlAttribute » atkWeekdayAttribute » atkWysiwygAttribute datatypes » atkArrayDt » atkDataType » atkStringDt » atkTime subpackage » atkAttributeTestCase security » atkBajusEncryption » atkBase64Encryption » atkEncryption » atkMockSecurityManager » atkOpenSSLEncryption » atkSecurityListener » atkSecurityManager » atkUrlVault » auth_config » auth_db » auth_imap » auth_interface » auth_ldap » auth_none » auth_pop3 » auth_server » auth_sspi cache » atkCache » atkCache_apc » atkCache_eaccelerator » atkCache_file » atkCache_memcache » atkCache_var » atkCache_xcache » atkCache_zp_disk » atkCache_zp_output » atkCache_zp_shm test » atkCacheTestCase » atkPluginTestCase » atkTestCase » test_sql_whereclause_blacklist_checker db » atkClusterDb » atkClusterDDL » atkClusterQuery » atkDb » atkDDL » atkMockDb » atkMockDDL » atkMockQuery » atkMsSqlDb » atkMsSqlDDL » atkMssqlQuery » atkMysqlDb » atkMysqlDDL » atkMysqliDb » atkMysqliDDL » atkMysqliQuery » atkMysqlQuery » atkOci8Db » atkOci8DDL » atkOci8Query » atkOci9Db » atkOci9DDL » atkOci9Query » atkOci805Db » atkOci805Query » atkPgsqlDb » atkPgsqlDDL » atkPgsqlQuery » atkQuery recordlist » atkColumnConfig » atkCSVRecordList » atkCustomRecordList » atkExcelCSVRecordList » atkHTMLRecordList » atkPrintableRecordList » atkRecordList » atkRecordlistCache » atkTotalizer db-statement » atkCompatStatement » atkMySQLiStatement » atkStatement » atkStatementException » atkStatementParser console » atkConsoleController menu » atkcookmenu » atkDhtmlMenu » atkDropdownMenu » atkFramesMenu » atkMenu » atkmenuinterface » atkModernMenu » atkOutlookMenu » atkPlainMenu datagrid » atkDataGrid » atkDGComponent » atkDGEditControl » atkDGEvent » atkDGIndex » atkDGLimit » atkDGList » atkDGNoRecordsFound » atkDGPaginator » atkDGRenderer » atkDGSummary lock » atkDbLock » atkLock filters » atkDistinctFilter » atkFilter » atkGroupByFilter document » atkDocumentWriter » atkDocxWriter » atkOpenDocumentWriter meta » atkDutchMetaGrammar » atkMetaAttributeModifier » atkMetaCompiler » atkMetaGrammar » atkMetaPolicy » mod_meta relations » atkExtendableShuttleRelation » atkManyBoolRelation » atkManyToManyListRelation » atkManyToManyRelation » atkManyToManySelectRelation » atkManyToOneRelation » atkManyToOneTreeRelation » atkMatrixRelation » atkOneToManyRelation » atkOneToOneRelation » atkPolymorphicOneToOneRelation » atkRelation » atkSecureRelation » atkShuttleControl » atkShuttleFilter » atkShuttleRelation front » atkFrontController » atkFrontControllerBridge keyboard » atkKeyboard meta-relations » atkMetaExtendableShuttleRelation » atkMetaManyBoolRelation » atkMetaManyToManyListRelation » atkMetaManyToManySelectRelation » atkMetaManyToOneRelation » atkMetaOneToManyRelation » atkMetaOneToOneRelation » atkMetaShuttleRelation session » atkMockSessionManager » atkSessionManager » atkState modules » atkModule » mod_test listeners » atkRecycleBin interface » atkServer » atkSoapServer wizard » atkWizard » AtkWizardActionLoader » atkWizardPanel
Interfaces: datagrid » atkDGListener interface » atkServerInterface
Files: general » adodb-time.inc.php » AllTests.php » atknodetools.inc » atktools.inc » atktreetools.inc » basexml.php » bootstrap.inc » bootstrap.php » class.atkconfig.inc » class.atkcontroller.inc » class.atkdatanode.inc » class.atkerrorhandlerbase.inc » class.atkfileeditor.inc » class.atklanguage.inc » class.atkmailerrorhandler.inc » class.atkmetanode.inc » class.atkmocknode.inc » class.atkmocksessionmanager.inc » class.atknode.inc » class.atknodevalidator.inc » class.atkonetomanyrelationsessiongridhandler.inc » class.atkpolymorphiconetoonerelation.inc » class.atksessionstore.inc » class.atkstatementiterator.inc » class.atktreenode.inc » class.atkwizardbase.inc » class.atkzendplatformerrorhandler.inc » class.layout.inc » class.nodename.inc » class.sql_whereclause_blacklist_checker.inc » class.test.inc » class.test_sql_whereclause_blacklist_checker.inc » commands.php » config.modules.inc » config.php » connector.php » console.php » db2yaml.php » defaultconfig.inc.php » fckeditor.php » fckeditor_php4.php » fckeditor_php5.php » io.php » module.inc » phpcompat.php » server.php » spellchecker.php » table2yaml.php » tbsooo_class.php » tbs_class.php » tooltip.tpl.php » upload.php » util.php » version.inc attributes » class.atkaggregatedcolumn.inc » class.atkattribute.inc » class.atkboolattribute.inc » class.atkcalculatorattribute.inc » class.atkcaptchaattribute.inc » class.atkcolorpickerattribute.inc » class.atkcountryattribute.inc » class.atkcreatedbyattribute.inc » class.atkcreatestampattribute.inc » class.atkcurrencyattribute.inc » class.atkdateattribute.inc » class.atkdatetimeattribute.inc » class.atkdocumentattribute.inc » class.atkdummyattribute.inc » class.atkdurationattribute.inc » class.atkemailattribute.inc » class.atkexpressionattribute.inc » class.atkfckattribute.inc » class.atkfieldset.inc » class.atkfileattribute.inc » class.atkfilewriterattribute.inc » class.atkflagattribute.inc » class.atkformatattribute.inc » class.atkfuzzysearchattribute.inc » class.atkhiddenattribute.inc » class.atkhtmlattribute.inc » class.atkipattribute.inc » class.atklistattribute.inc » class.atklivetextpreview.inc » class.atkmlattribute.inc » class.atkmlhtmlattribute.inc » class.atkmlnumberattribute.inc » class.atkmlselectorattribute.inc » class.atkmltextattribute.inc » class.atkmlwrapper.inc » class.atkmultiplefileattribute.inc » class.atkmultiselectattribute.inc » class.atknumberattribute.inc » class.atkparserattribute.inc » class.atkpasswordattribute.inc » class.atkprofileattribute.inc » class.atkradioattribute.inc » class.atkradiodetailsattribute.inc » class.atkrowcounter.inc » class.atkstateattribute.inc » class.atktabbedpane.inc » class.atktagattribute.inc » class.atktextattribute.inc » class.atktimeattribute.inc » class.atktimezoneattribute.inc » class.atktoolbar.inc » class.atkupdatedbyattribute.inc » class.atkupdatestampattribute.inc » class.atkurlattribute.inc » class.atkweekdayattribute.inc » class.atkwysiwygattribute.inc attributes-- » property_accessor.php cache » class.atkcache.inc » class.atkcache_apc.inc » class.atkcache_eaccelerator.inc » class.atkcache_file.inc » class.atkcache_memcache.inc » class.atkcache_var.inc » class.atkcache_xcache.inc » class.atkcache_zp_disk.inc » class.atkcache_zp_output.inc » class.atkcache_zp_shm.inc console » class.atkconsolecontroller.inc datagrid » class.atkdatagrid.inc » class.atkdgcomponent.inc » class.atkdgeditcontrol.inc » class.atkdgevent.inc » class.atkdgindex.inc » class.atkdglimit.inc » class.atkdglist.inc » class.atkdglistener.inc » class.atkdgnorecordsfound.inc » class.atkdgpaginator.inc » class.atkdgrenderer.inc » class.atkdgsummary.inc datatypes » class.atkarraydt.inc » class.atkdatatype.inc » class.atkstringdt.inc » class.atktimedt.inc db » class.atkclusterdb.inc » class.atkclusterddl.inc » class.atkclusterquery.inc » class.atkdb.inc » class.atkddl.inc » class.atkmockdb.inc » class.atkmockddl.inc » class.atkmockquery.inc » class.atkmssqldb.inc » class.atkmssqlddl.inc » class.atkmssqlquery.inc » class.atkmysqldb.inc » class.atkmysqlddl.inc » class.atkmysqlidb.inc » class.atkmysqliddl.inc » class.atkmysqliquery.inc » class.atkmysqlquery.inc » class.atkoci8db.inc » class.atkoci8ddl.inc » class.atkoci8query.inc » class.atkoci9db.inc » class.atkoci9ddl.inc » class.atkoci9query.inc » class.atkoci805db.inc » class.atkoci805query.inc » class.atkpgsqldb.inc » class.atkpgsqlddl.inc » class.atkpgsqlquery.inc » class.atkquery.inc db-statement » class.atkcompatstatement.inc » class.atkmysqlistatement.inc » class.atkstatement.inc » class.atkstatementexception.inc » class.atkstatementparser.inc document » class.atkdocumentwriter.inc » class.atkdocxwriter.inc » class.atkopendocumentwriter.inc filters » class.atkdistinctfilter.inc » class.atkfilter.inc » class.atkgroupbyfilter.inc fixture » class.atkabstractfixtureloader.inc » class.atkfixturemanager.inc » class.atkphpfixtureloader.inc » class.atkyamlfixtureloader.inc front » class.atkfrontcontroller.inc » class.atkfrontcontrollerbridge.inc handlers » class.atkactionhandler.inc » class.atkaddhandler.inc » class.atkaddorcopyhandler.inc » class.atkadminhandler.inc » class.atkattributeedithandler.inc » class.atkcopyhandler.inc » class.atkdeletehandler.inc » class.atkdocumenthandler.inc » class.atkeditcopyhandler.inc » class.atkedithandler.inc » class.atkexporthandler.inc » class.atkfeedbackhandler.inc » class.atkfileexport.inc » class.atkimporthandler.inc » class.atkmultiselecthandler.inc » class.atkmultiupdatehandler.inc » class.atksavehandler.inc » class.atksearchhandler.inc » class.atkselecthandler.inc » class.atksmartsearchhandler.inc » class.atkupdatehandler.inc » class.atkvieweditbase.inc » class.atkviewhandler.inc » class.atkxmlhandler.inc include » autoload.inc » basics.inc » compatibility.inc » configs.inc » debugging.inc » errorhandler.inc » globals.inc » initial.inc » security.inc interface » class.atkserver.inc » class.atksoapserver.inc » interface.atkserverinterface.inc javascript » class.atkmultilanguage.js.php » class.atkprofileattribute.js.php » dhtml_tabs.js.php keyboard » class.atkkeyboard.inc listeners » class.atkrecyclebin.inc lock » class.atkdblock.inc » class.atklock.inc » lock.php lock-- » lock.js.php menu » atkmenutools.inc » class.atkcookmenu.inc » class.atkdhtmlmenu.inc » class.atkdropdownmenu.inc » class.atkframesmenu.inc » class.atkmenu.inc » class.atkmenuinterface.inc » class.atkmodernmenu.inc » class.atkoutlookmenu.inc » class.atkplainmenu.inc meta » class.atkdutchmetagrammar.inc » class.atkmetaattributemodifier.inc » class.atkmetacompiler.inc » class.atkmetagrammar.inc » class.atkmetapolicy.inc » module.inc meta-relations » class.atkmetaextendableshuttlerelation.inc » class.atkmetamanyboolrelation.inc » class.atkmetamanytomanylistrelation.inc » class.atkmetamanytomanyselectrelation.inc » class.atkmetamanytoonerelation.inc » class.atkmetaonetomanyrelation.inc » class.atkmetaonetoonerelation.inc » class.atkmetashuttlerelation.inc modules » class.atkmodule.inc modules-- » atkmoduletools.inc popups » colorpicker.inc recordlist » class.atkcolumnconfig.inc » class.atkcsvrecordlist.inc » class.atkcustomrecordlist.inc » class.atkexcelcsvrecordlist.inc » class.atkhtmlrecordlist.inc » class.atkprintablerecordlist.inc » class.atkrecordlist.inc » class.atkrecordlistcache.inc » class.atktotalizer.inc relations » class.atkextendableshuttlerelation.inc » class.atkmanyboolrelation.inc » class.atkmanytomanylistrelation.inc » class.atkmanytomanyrelation.inc » class.atkmanytomanyselectrelation.inc » class.atkmanytoonerelation.inc » class.atkmanytoonetreerelation.inc » class.atkmatrixrelation.inc » class.atkonetomanyrelation.inc » class.atkonetoonerelation.inc » class.atkrelation.inc » class.atksecurerelation.inc » class.atkshuttlecontrol.inc » class.atkshuttlefilter.inc » class.atkshuttlerelation.inc security » class.atkbajusencryption.inc » class.atkbase64encryption.inc » class.atkencryption.inc » class.atkmocksecuritymanager.inc » class.atkmocksecuritymanager.inc » class.atkopensslencryption.inc » class.atksecuritylistener.inc » class.atksecuritymanager.inc » class.atkurlvault.inc » class.auth_config.inc » class.auth_db.inc » class.auth_imap.inc » class.auth_interface.inc » class.auth_ldap.inc » class.auth_none.inc » class.auth_pop3.inc » class.auth_server.inc » class.auth_sspi.inc session » class.atksessionmanager.inc » class.atkstate.inc skel » app.php » atk.inc » config.inc.php » debugger.php » dispatch.php » include.php » index.php » menu.php » top.php » welcome.php subpackage » class.atkattributetestcase.inc test » class.atkcachetestcase.inc » class.atkplugintestcase.inc » class.atktestcase.inc testcases » class.atkabstractsearchhandler.inc themes » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc ui » block.atknavigator.php » block.atknavigatorinfo.php » class.atkactionboxbuilder.inc » class.atkdialog.inc » class.atkindexpage.inc » class.atkoutput.inc » class.atkpage.inc » class.atkpagebuilder.inc » class.atktheme.inc » class.atkthemecompiler.inc » class.atkui.inc » function.atkconf.php » function.atkconfig.php » function.atkdatefield.php » function.atkdispatchfile.php » function.atkfrontcontroller.php » function.atkloadscript.php » function.atkmessages.php » function.atkmoduledir.php » function.atkscript.php » function.atkstyle.php » function.atktext.php » function.atkthemeicon.php » function.atkthemeimg.php » function.stacktrace.php » modifier.atkjson.php » modifier.atkvardump.php » resource.string.php » resource.theme.php » resource.ui.php utils » atkbrowsertools.inc » class.atkactionlistener.inc » class.atkclassloader.inc » class.atkcompatselector.inc » class.atkdataholder.inc » class.atkdebugger.inc » class.atkdirectorytraverser.inc » class.atkeventlog.inc » class.atkfileutils.inc » class.atkframeset.inc » class.atkiputils.inc » class.atkjson.inc » class.atkmail.inc » class.atkmailer.inc » class.atkmessagequeue.inc » class.atkmlselector.inc » class.atkmlsplitter.inc » class.atkselector.inc » class.atkselectoriterator.inc » class.atkstring.inc » class.atkstringparser.inc » class.atktablerenderer.inc » class.atktablerenderergrouped.inc » class.atktextmarker.inc » class.atktmpfile.inc » class.atktriggerlistener.inc » class.atkyaml.inc » class.atkzip.inc » help.inc wizard » class.atkwizard.inc » class.atkwizardactionloader.inc » class.atkwizardpanel.inc
Home  ->  Documentation home  ->  Atk index  ->  Docs For Class atkLanguage [ package: atk ]

Class: atkLanguage

Source Location: /class.atklanguage.inc

Class atkLanguage

Class Overview

Class that handles userinterface internationalization.

This class is used to retrieve the proper translations for any string displayed in the userinterface. It includes only those language files that are actually used, and has several fallback systems to find translations if they can be find in the correct module.

Located in /class.atklanguage.inc [line 29]

Wiki documentation



		
				Author(s):
		
		
		
Information Tags:

Properties

Methods

[ Top ]

Property Summary

static atkLanguage   $s_instance   Instance.
static array   $s_supportedLanguages   Supported languages.
String   $LANGDIR   Directory where language files are stored.
array   $m_cachedlang   Contains all currently loaded language strings.
array   $m_cachedlangfiles   List of currently loaded language files
array   $m_customStrings   List of custum language string overrides
array   $m_fallbackmodules   List of fallback modules
array   $m_overridemodules   List of override modules

[ Top ]

Method Summary

static atkLanguage   getInstance()   Gets an instance of the atkLanguage class
static String   getLanguage()   Get the current language, either from url, or if that's not present, from what the user has set.
static String   getLanguageFromHeaders()   Get the primary languagecode that the user has set in his/her browser
static Array   getSupportedLanguages()   Get the languages supported by the application
static unknown   getUserLanguage()   Get the selected language of the current user if he/she set one, otherwise we try to get it from the browser settings and if even THAT fails, we return the default language.
static void   setLanguage()   Change the current language.
static void   setSupportedLanguages()   Explicitly sets the supported languages.
static String   text()   Text function, retrieves a translation for a certain string.
atkLanguage   __construct()   Default Constructor
void   addFallbackModule()   Add a module that servers as a fallback for language strings.
void   addOverrideModule()   Add a module that serves as an override for language strings.
string   defaultText()   A function to change the original "$something_text" string to
String   getLanguageDirForModule()   Method for getting the relative path to the languagedirectory of a module.
void   setText()   Set a custom language string
array   _getFallbackModules()   Calculate the list of fallbackmodules.
array   _getModules()   Determine the list of modules we need to go through to check language strings. Overrides have precedence, then the passed module is considered, finally if no string is found the fallbacks are checked.
string   _getString()   This function takes care of the fallbacks when retrieving a string ids.
var   _getStringFromFile()   Gets the string from the languagefile or, if we failed, returns ""
bool   _includeLanguage()   Checks wether the language is set or not

[ Top ]

Properties

static atkLanguage   $s_instance = null [line 36]

Instance.

API Tags:
Access:  private


[ Top ]
static array   $s_supportedLanguages = null [line 43]

Supported languages.

API Tags:
Access:  private


[ Top ]
String   $LANGDIR = "languages/" [line 50]

Directory where language files are stored.

API Tags:
Access:  private


[ Top ]
array   $m_cachedlang = array() [line 57]

Contains all currently loaded language strings.

API Tags:
Access:  private


[ Top ]
array   $m_cachedlangfiles = array() [line 64]

List of currently loaded language files

API Tags:
Access:  private


[ Top ]
array   $m_customStrings = array() [line 85]

List of custum language string overrides

API Tags:
Access:  private


[ Top ]
array   $m_fallbackmodules = array() [line 71]

List of fallback modules

API Tags:
Access:  private


[ Top ]
array   $m_overridemodules = array("langoverrides") [line 78]

List of override modules

API Tags:
Access:  private


[ Top ]

Methods

static method getInstance  [line 104]

  static atkLanguage getInstance( )

Gets an instance of the atkLanguage class

Using this function will ensure that only 1 instance ever exists (singleton).


API Tags:
Return:  Instance of the atkLanguage class
Access:  public


[ Top ]
static method getLanguage  [line 214]

  static String getLanguage( )

Get the current language, either from url, or if that's not present, from what the user has set.


API Tags:
Return:  current language.
Access:  public


[ Top ]
static method getLanguageFromHeaders  [line 279]

  static String getLanguageFromHeaders( )

Get the primary languagecode that the user has set in his/her browser


API Tags:
Return:  The languagecode
Access:  public


[ Top ]
static method getSupportedLanguages  [line 309]

  static Array getSupportedLanguages( )

Get the languages supported by the application


API Tags:
Return:  An array with the languages supported by the application.
Access:  public


[ Top ]
static method getUserLanguage  [line 247]

  static unknown getUserLanguage( )

Get the selected language of the current user if he/she set one, otherwise we try to get it from the browser settings and if even THAT fails, we return the default language.


API Tags:
Access:  public


[ Top ]
static method setLanguage  [line 233]

  static void setLanguage( String $lng  )

Change the current language.

Note that his only remains set for the current request, it's not session based.

Parameters:
String   $lng:  The language to set

API Tags:
Access:  public


[ Top ]
static method setSupportedLanguages  [line 298]

  static void setSupportedLanguages( $languages  )

Explicitly sets the supported languages.

Parameters:
array   $languages:  supported languages

API Tags:
Access:  public


[ Top ]
static method text  [line 184]

  static String text( mixed $string, String $module, [String $node = ""], [String $lng = ""], [String $firstfallback = ""], [bool $nodefaulttext = false], [bool $modulefallback = false]  )

Text function, retrieves a translation for a certain string.

Parameters:
mixed   $string:  string or array of strings containing the name(s) of the string to return when an array of strings is passed, the second will be the fallback if the first one isn't found, and so forth
String   $module:  module in which the language file should be looked for, defaults to core module with fallback to ATK
String   $node:  the node to which the string belongs
String   $lng:  ISO 639-1 language code, defaults to config variable
String   $firstfallback:  the first module to check as part of the fallback
bool   $nodefaulttext:  if true, then it doesn't returns false when it can't find a translation
bool   $modulefallback:  Wether or not to use all the modules of the application in the fallback, when looking for strings

API Tags:
Return:  the string from the languagefile
Access:  public


[ Top ]
Constructor __construct  [line 91]

  atkLanguage __construct( )

Default Constructor


API Tags:
Access:  public


[ Top ]
addFallbackModule  [line 129]

  void addFallbackModule( String $module  )

Add a module that servers as a fallback for language strings.

Parameters:
String   $module:  Name of the module to add.

API Tags:
Access:  public


[ Top ]
addOverrideModule  [line 119]

  void addOverrideModule( String $module  )

Add a module that serves as an override for language strings.

Parameters:
String   $module:  Name of the module to add.

API Tags:
Access:  public


[ Top ]
defaultText  [line 480]

  string defaultText( string $string  )

A function to change the original "$something_text" string to

"Something text" This is only used when we really can't find the "$something_text" anywhere

Parameters:
string   $string:  the name of the string to return

API Tags:
Return:  the changed string
Access:  public


[ Top ]
getLanguageDirForModule  [line 456]

  String getLanguageDirForModule( String $module  )

Method for getting the relative path to the languagedirectory of a module.

Supports 2 special modules:

  • atk (returns the path of the atk languagedir)
  • langoverrides (returns the path of the languageoverrides dir)
Special method in that it can run both in static and non-static mode.

Parameters:
String   $module:  The module to get the languagedir for

API Tags:
Return:  The relative path to the languagedir
Access:  public


[ Top ]
setText  [line 514]

  void setText( string $code, string $text, string $lng  )

Set a custom language string

Parameters:
string   $code:  The code of the custom string
string   $text:  Text
string   $lng:  Language

API Tags:
Access:  public


[ Top ]
_getFallbackModules  [line 142]

  array _getFallbackModules( bool $modulefallback  )

Calculate the list of fallbackmodules.

Parameters:
bool   $modulefallback:  Wether or not to use all the modules of the application in the fallback, when looking for strings

API Tags:
Return:  Array of fallback modules
Access:  protected


[ Top ]
_getModules  [line 340]

  array _getModules( String $module, [String $firstfallback = ""], [Boolean $modulefallback = false]  )

Determine the list of modules we need to go through to check language strings. Overrides have precedence, then the passed module is considered, finally if no string is found the fallbacks are checked.

Parameters:
String   $module:  manually passed module
String   $firstfallback:  an additional module in which the translation will be searched first, if not found in the module itself.
Boolean   $modulefallback:  If true, *all* modules are checked.

API Tags:
Return:  List of modules to use to find the translations
Access:  protected


[ Top ]
_getString  [line 370]

  string _getString( string $key, string $module, string $lng, [string $node = ""], [bool $nodefaulttext = false], [string $firstfallback = ""], [bool $modulefallback = false]  )

This function takes care of the fallbacks when retrieving a string ids.

It is as following: First we check for a string specific to both the module and the node (module_node_key). If that isn't found we check for a node specific string (node_key). And if all that fails we look for a general string in the module.

Parameters:
string   $key:  the name of the string to return
string   $module:  module in which the language file should be looked for, defaults to core module with fallback to ATK
string   $lng:  ISO 639-1 language code, defaults to config variable
string   $node:  the node to which the string belongs
bool   $nodefaulttext:  wether or not to pass a default text back
string   $firstfallback:  the first module to check as part of the fallback
bool   $modulefallback:  Wether or not to use all the modules of the application in the fallback, when looking for strings

API Tags:
Return:  the name with which to call the string we want from the languagefile
Access:  protected


[ Top ]
_getStringFromFile  [line 494]

  var _getStringFromFile( string $key, string $module, string $lng  )

Gets the string from the languagefile or, if we failed, returns ""

Parameters:
string   $key:  the name which was given when the text function was called
string   $module:  the name of the module to which the text function belongs
string   $lng:  the current language

API Tags:
Return:  the true name by which the txt is called or "" if we can't find any entry
Access:  protected


[ Top ]
_includeLanguage  [line 423]

  bool _includeLanguage( string $module, string $lng  )

Checks wether the language is set or not

If set, it does nothing and return true otherwise it sets it

Parameters:
string   $module:  the module to import the language file from
string   $lng:  language of file to import

API Tags:
Return:  true if everything went okay
Access:  protected


[ Top ]
sitemap | contact | privacy | general conditions | © 1999 - 2008 Ibuildings BV