mirror of
https://github.com/nextcloud/documentation.git
synced 2026-01-03 02:09:45 +07:00
replace echo with p
This commit is contained in:
@@ -4,9 +4,9 @@ Translation
|
||||
Make text translatable
|
||||
----------------------
|
||||
|
||||
In HTML or PHP wrap it like this <?php echo $l->t('This is some text');?>
|
||||
For the right date format use <?php echo $l->l('date', time());?>. Change the way dates are shown by editing /core/l10n/l10n-[lang].php
|
||||
To translate text in javascript use: t('appname','text to translate');
|
||||
In HTML or PHP wrap it like this ``<?php p($l->t('This is some text'));?>`` or this ``<?php print_unescaped($l->t('This is some text'));?>``
|
||||
For the right date format use ``<?php p($l->l('date', time()));?>``. Change the way dates are shown by editing /core/l10n/l10n-[lang].php
|
||||
To translate text in javascript use: ``t('appname','text to translate');``
|
||||
|
||||
You shall never split sentences!
|
||||
--------------------------------
|
||||
@@ -21,7 +21,7 @@ Example:
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
<?php echo $l->t('Select file from') . ' '; ?><a href='#' id="browselink"><?php echo $l->t('local filesystem');?></a><?php echo $l->t(' or '); ?><a href='#' id="cloudlink"><?php echo $l->t('cloud');?></a>
|
||||
<?php p($l->t('Select file from')) . ' '; ?><a href='#' id="browselink"><?php p($l->t('local filesystem'));?></a><?php p($l->t(' or ')); ?><a href='#' id="cloudlink"><?php p($l->t('cloud'));?></a>
|
||||
|
||||
Translators will translate:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Reference in New Issue
Block a user