Skip to content

Localization

By default, all buttons just contain icons but no texts. If you prefer text buttons, create an array holding text values according to the samples below, and pass that labels-array as 4th parameter to the attach -function.

No labels (default)

1
AppGiniHelperRecordLock::attach("YOUR_TABLE_NAME", $selectedID, $html;

English labels

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
$labels_en = [
    'Lock' => 'Edit',
    'Unlock' => 'Close',
    'ForwardTo' => 'Forward to %',
    'Send' => 'Hand over',
    'Reload' => 'Reload',
    'LockedBy' => 'Locked by %',
    'RequestedBy' => 'Requested by %',
    'Request' => 'Request',
    'CancelRequest' => 'Cancel Request'
];
AppGiniHelperRecordLock::attach("YOUR_TABLE_NAME", $selectedID, $html, $labels_en);

Screenshots of English labels

Edit

Close

Forward

Reload

Locked

Cancel

Cancel


German labels

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
$labels_de = [
    'Lock' => 'Bearbeiten',
    'Unlock' => 'Schließen',
    'ForwardTo' => 'Übergeben an<br /><span class="label label-default"><i class="glyphicon glyphicon-user"></i> %</span>', // an %',
    'Send' => 'Übergeben',
    'Reload' => 'Aktualisieren',
    'LockedBy' => 'Bearbeitung durch %', 
    'RequestedBy' => 'Angefordert durch %',
    'Request' => 'Bearbeitung<br/>anfordern von %',
    'CancelRequest' => 'Anforderung<br/>abbrechen'
];
AppGiniHelperRecordLock::attach("YOUR_TABLE_NAME", $selectedID, $html, $labels_de);

Screenshots of German labels

Edit

Close

Forward

Reload

Locked

Cancel

Cancel


More labels

Feel free to send me your translations. I will be happy to publish them here


Tips

HTML
You can use HTML inside the labels, for example
'ForwardTo' => 'Forward<br />to &rarr; %',
This example will render a line-break and a right-arrow.

HTML Tags having attributes
When using more complex HTML including tags with attributes, be careful with quotes!
'ForwardTo' => 'Übergeben an<br /><span class="label label-default"><i class="glyphicon glyphicon-user"></i> %</span>',
In this example single quotes '...' wrap the whole label whereas double quotes "..." wrap HTML-tag attribute values within the label