Skip to content
This repository was archived by the owner on Jan 23, 2020. It is now read-only.

Latest commit

 

History

History
22 lines (21 loc) · 789 Bytes

Languages.md

File metadata and controls

22 lines (21 loc) · 789 Bytes

Languages are presented in form of PHP file and/or JSON file, that contains translations in JSON format. For simplier editing JSON files may contain comments, they are placed in separate lines and starts from double slash //

Example of JSON language file:

{
    //This is comment, it will be ignored
    "some_words": "Some words"
}

Example of PHP language file:

<?php
$L = \cs\Language::instance();
//Translations can be set separately
$L->some_words = 'Some words';
//Or in form of arrays
$L->set([
    'one_more_phrase' => 'One more phrase',
    'The last phrase' => 'The last phrase'
]);

All core translations are stored in directory core/languages. Translations of components usually are located in languages directory of component location of server.