mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-25 01:12:46 +00:00
Added lang/README.md
This commit is contained in:
parent
73eb0e152f
commit
57cb8c54e8
18
lang/README.md
Normal file
18
lang/README.md
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
To create a new locale:
|
||||||
|
- Copy lang/en_US.utf8.php to a new file (e.g. `lang/es_ES.utf8.php`)
|
||||||
|
- Edit the new file, change "class DefaultLang" to "class Lang" so it looks like this:
|
||||||
|
```
|
||||||
|
|
||||||
|
<?php
|
||||||
|
class Lang {
|
||||||
|
public function __construct() {
|
||||||
|
...
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
- Translate all array assignments, e.g. `$array["page.permanent.ban"] = 'Baneo Permanente';`
|
||||||
|
- Edit settings.php, set `this->lang` to your locale. Example: `$this->lang = 'es_ES.utf8';`
|
||||||
|
|
||||||
|
All messages not translated by the main locale will be translated by the fallback locale (en_US.utf8).
|
||||||
|
Thus, if your locale is outdated (if new messages are added to en_US), those new messages will be in English.
|
Loading…
x
Reference in New Issue
Block a user