Skip to content

Commit

Permalink
Adding translations for notes
Browse files Browse the repository at this point in the history
Ref #5
  • Loading branch information
algorys committed Aug 8, 2017
1 parent 2efc66e commit 79aeaad
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 6 deletions.
13 changes: 13 additions & 0 deletions lang/en/lang.php
@@ -0,0 +1,13 @@
<?php
// * English language file

// settings must be present and set appropriately for the language
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';

$lang['bootnote.info'] = 'Note';
$lang['bootnote.question'] = 'Question';
$lang['bootnote.learn'] = 'To Know';
$lang['bootnote.link'] = 'Link';
$lang['bootnote.alert'] = 'Warning';
$lang['bootnote.fire'] = 'Important';
14 changes: 14 additions & 0 deletions lang/fr/lang.php
@@ -0,0 +1,14 @@
<?php
// * French language file

// settings must be present and set appropriately for the language
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';

$lang['bootnote.info'] = 'Note';
$lang['bootnote.question'] = 'Question';
$lang['bootnote.learn'] = 'A Savoir';
$lang['bootnote.link'] = 'Lien';
$lang['bootnote.alert'] = 'Attention';
$lang['bootnote.fire'] = 'Important';

12 changes: 6 additions & 6 deletions syntax.php
Expand Up @@ -146,12 +146,12 @@ function _render_note($renderer, $glyph) {

function getTitle($glyph) {
$titles = Array(
'info-sign' => 'Note',
'education' => 'To Know',
'question-sign' => 'Question',
'alert' => 'Warning',
'fire' => 'Important',
'globe' => 'Link'
'info-sign' => $this->getLang('bootnote.info'),
'education' => $this->getLang('bootnote.learn'),
'question-sign' => $this->getLang('bootnote.question'),
'alert' => $this->getLang('bootnote.alert'),
'fire' => $this->getLang('bootnote.fire'),
'globe' => $this->getLang('bootnote.link')
);

return $titles[$glyph];
Expand Down

0 comments on commit 79aeaad

Please sign in to comment.