Difference between revisions of "Addons:Language"

From GExtension Wiki
Jump to navigation Jump to search
(Created page with "Language files should be named after this pattern: <2-digit-country-code>.php For example de.php, fr.php or en.php == Content == The file must contain the following to acces...")
 
Line 7: Line 7:
 
  global $language;
 
  global $language;
  
After that, language strings can be added with the pattern $languag['<identifier>'] = '<translation>'. For example:
+
After that, language strings can be added with the pattern $language['<identifier>'] = '<translation>'. For example:
 
  $language['changes_unsaged'] = 'Unsafed Changes';
 
  $language['changes_unsaged'] = 'Unsafed Changes';
 
  $language['category_create'] = 'Create Category';
 
  $language['category_create'] = 'Create Category';
 
  $language['payment_pending'] = 'Your payment is pending...';
 
  $language['payment_pending'] = 'Your payment is pending...';
 
  ...
 
  ...

Revision as of 09:39, 21 May 2017

Language files should be named after this pattern: <2-digit-country-code>.php

For example de.php, fr.php or en.php

Content

The file must contain the following to access the language variable:

global $language;

After that, language strings can be added with the pattern $language['<identifier>'] = '<translation>'. For example:

$language['changes_unsaged'] = 'Unsafed Changes';
$language['category_create'] = 'Create Category';
$language['payment_pending'] = 'Your payment is pending...';
...