mirror of
https://github.com/nextcloud/documentation.git
synced 2026-01-03 02:09:45 +07:00
Document how to use variables in translations in javascript
This commit is contained in:
@@ -48,10 +48,18 @@ What about variable in the strings?
|
||||
|
||||
If you need to add variables to the translation strings do it like this:
|
||||
|
||||
PHP:
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
$l->t('%s is available. Get <a href="%s">more information</a>', array($data['versionstring'], $data['web']));
|
||||
|
||||
JavaScript:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
t(appName, '{name} is available. Get <a href="{link}">more information</a>', {name: 'Nextcloud 16', link: '...'});
|
||||
|
||||
Automated synchronization of translations
|
||||
-----------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user