mirror of https://github.com/MISP/misp-book
- Added some notes on preparing the code for i18n
parent
858ce08035
commit
2178b6cc84
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue