开发者

Drupal: a question about t() function

开发者 https://www.devze.com 2023-02-06 07:54 出处:网络
I\'ve added the following text in the t() function in page.tpl.php page. <?php echo t(\'Some random text to translate.\'); ?>

I've added the following text in the t() function in page.tpl.php page.

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

Now when I go to admin/build/translate/search to translate the string drupal cannot fin开发者_运维知识库d it.

I've refreshed all caches, and also the "Refresh" tab in internationalization module.

thanks


The t() function, to save on performance for single-language sites, won't store the string in the database until it is requested from another language. View the page in one of the non-default languages in order to populate the database (t() calls locale() to do this), thus making the string available for translation.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号