Dimofinf provides a professional flexible system to deal with languages, main points regarding the language system are mentioned below: 

 

The language file is saved in xml file, in xml folder included in the plugin folder.

The default language is English and its file is saved by the context  pluginfolder-language.xml, otherwise, subset languages are saved by the context pluginfolder-langcode.xml. As “plugin folder” is the plugin folder name, and “language code” is the subset language code, for example: 

-  plugin-language.xml is for the default language “English”. 

- plugin-ar-language.xml is for the subset language “Alrabic”. 

 

An example of the XML of language: 

CODE:

Notes: 

Sentences are divided into groups, each group has its own ones. 

The feature “name” in the language tag, is the language address. As the language_name is replaced with the language address. 

The feature “version” in the language tag, is the Dimofinf version number that the language file is working in. 

The feature “product”in the language tag is used for the plugin folder name, as the plugin is replaced with the plugin folder name.

The feature “type”in the language tag is used to set the language type, as a master value is set for the English language “default”, and custom value for the subset languages such as Arabic. 

The feature name in the phrase type tag is a title of sentences group. 

The feature name in the phrase type tag is a name of sentences group. 

The feature name in the phrase tag is the sentence name.  

The sentence is put between tags, as the sentence is replaced with the phrase. 

Basics: 

-Recalling a sentence from PHP file: 

In PHP file, you need firstly to define the sentences that you want to use, so that you are able to call them 

Example: 

PHP :

{* php buffer start *}   

{* php buffer end *}

Along with replacing the phrase name with the sentence one.

 

Was this answer helpful? 20 Users Found This Useful (20 Votes)