- Added some notes on preparing the code for i18n

pull/87/head
Steve Clement 2018-01-09 10:02:45 +01:00
parent 858ce08035
commit 2178b6cc84
1 changed files with 33 additions and 0 deletions

View File

@ -8,6 +8,39 @@ Please read the following CakePHP documentation about i18n & l10n: https://book.
Please add a file à la: ja_JP.md (Japanese_Japan) or it_CH.md (Italian_Switzerland), in which you briefly describe what the current status is and what has been translated and which parts might be gotchas.
## Quirks
Lines like this:
```
echo $this->Form->button('Submit', array('class' => 'btn btn-primary'));$
```
Should be prepared as such:
```
echo $this->Form->button(__('Submit'), array('class' => 'btn btn-primary'));
```
Or another case:
```
echo $this->Form->input('sharing_group_id', array(
'options' => array($sharingGroups),
'label' => 'Sharing Group',
));
```
To:
```
echo $this->Form->input('sharing_group_id', array(
'options' => array($sharingGroups),
'label' => __('Sharing Group'),
));
```
## Let us know!
If you plan to do a translation or localization, please open a ticket on the issue system: https://github.com/MISP/MISP-book/issues