Load Translation Via Xml
Function: loadTransViaXml
Visibility: public
Parameter: loadTransViaXml($fileName)
Description:
This function is used by loadTrans, but can be used separately also. It's loading the translation from a xml file as described at loadTrans.
Parameters:
(required) - string - $file - The name of the file we want to load, must be located at: \text\translations\langCode.
Return:
array - The translation data - Contain all the translated text.
Callable from (extended classes):
application: controller,view
advanced: controller,view
operators: controller,view
api: controller,view
example: 1
Let's say that we want to load translation file, it must be located first in the designated directory mentioned at loadTrans. The text that will be stored there must be in xml format with tags like in this example.
How to call (example):
Possible outcome (example):
Output: