Drupal: question about t () function

I added the following text to the t () function on page.tpl.php.

<?php echo t('Some random text to translate.'); ?>

Now, when I go to admin / build / translate / search to translate a line, drupal cannot find it.

I updated all the caches, as well as the Refresh tab in the internationalization module.

thank

+3
source share
1 answer

The t () function , in order to maintain performance for monolingual sites, will not store a string in the database until it is requested from another language. Browse a page in one of the non-default languages ​​to populate the database (t () calls locale () to do this ), thus making the string available for translation.

+5
source

Source: https://habr.com/ru/post/1787157/


All Articles