<i id='D2Z15'><tr id='D2Z15'><dt id='D2Z15'><q id='D2Z15'><span id='D2Z15'><b id='D2Z15'><form id='D2Z15'><ins id='D2Z15'></ins><ul id='D2Z15'></ul><sub id='D2Z15'></sub></form><legend id='D2Z15'></legend><bdo id='D2Z15'><pre id='D2Z15'><center id='D2Z15'></center></pre></bdo></b><th id='D2Z15'></th></span></q></dt></tr></i><div id='D2Z15'><tfoot id='D2Z15'></tfoot><dl id='D2Z15'><fieldset id='D2Z15'></fieldset></dl></div>
<legend id='D2Z15'><style id='D2Z15'><dir id='D2Z15'><q id='D2Z15'></q></dir></style></legend>
<tfoot id='D2Z15'></tfoot>
    <bdo id='D2Z15'></bdo><ul id='D2Z15'></ul>

  1. <small id='D2Z15'></small><noframes id='D2Z15'>

      在 Drupal 7 中更改消息

      时间:2023-06-22

              • <bdo id='i7IWL'></bdo><ul id='i7IWL'></ul>

                <small id='i7IWL'></small><noframes id='i7IWL'>

              • <tfoot id='i7IWL'></tfoot>
                <i id='i7IWL'><tr id='i7IWL'><dt id='i7IWL'><q id='i7IWL'><span id='i7IWL'><b id='i7IWL'><form id='i7IWL'><ins id='i7IWL'></ins><ul id='i7IWL'></ul><sub id='i7IWL'></sub></form><legend id='i7IWL'></legend><bdo id='i7IWL'><pre id='i7IWL'><center id='i7IWL'></center></pre></bdo></b><th id='i7IWL'></th></span></q></dt></tr></i><div id='i7IWL'><tfoot id='i7IWL'></tfoot><dl id='i7IWL'><fieldset id='i7IWL'></fieldset></dl></div>
                <legend id='i7IWL'><style id='i7IWL'><dir id='i7IWL'><q id='i7IWL'></q></dir></style></legend>

                  <tbody id='i7IWL'></tbody>
              • 本文介绍了在 Drupal 7 中更改消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                drupal 中有几条消息.当出现 php 警告时,会引发错误消息,但模块也可以使用 drupal_set_message() 引发消息.问题是:有没有办法改变这些消息?例如,将每条消息中的每个a"替换为b".

                There is a couple of messages in drupal. When there is a php warning, an error message is raised, but a module can also raise messages with drupal_set_message(). The question is: Is there a way to alter these messages? For example to replace every 'a' with 'b' in every message.

                谢谢!

                推荐答案

                虽然现场没有消息更改,但您可以通过 hook_preprocess_status_messages 更改显示,参见 http://api.drupal.org/api/drupal/includes--theme.inc/function/theme/7 关于预处理和 http://api.drupal.org/api/drupal/includes--theme.inc/function/theme_status_messages/7 .

                While there is no message alter on set, you can change them on display via hook_preprocess_status_messages, see http://api.drupal.org/api/drupal/includes--theme.inc/function/theme/7 on preprocess and http://api.drupal.org/api/drupal/includes--theme.inc/function/theme_status_messages/7 .

                您也可以尝试字符串覆盖检查 http://api.drupal.org/api/drupal/includes--bootstrap.inc/function/t/7 ,简而言之 $conf['locale_custom_strings_en']['some message'] ='some messbge'; 为英文,如果不是英文,请将 _en 更改为其他内容.

                also you can try string overrides check http://api.drupal.org/api/drupal/includes--bootstrap.inc/function/t/7 , in short $conf['locale_custom_strings_en']['some message'] = 'some messbge'; for English, change _en for something else if it's not English.

                这篇关于在 Drupal 7 中更改消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:在开发、登台和生产之间同步 Drupal 站点 下一篇:在 drupal 中使用 hook_form_alter 设置 webform 组件值

                相关文章

                • <bdo id='B5ri9'></bdo><ul id='B5ri9'></ul>

                <small id='B5ri9'></small><noframes id='B5ri9'>

                <i id='B5ri9'><tr id='B5ri9'><dt id='B5ri9'><q id='B5ri9'><span id='B5ri9'><b id='B5ri9'><form id='B5ri9'><ins id='B5ri9'></ins><ul id='B5ri9'></ul><sub id='B5ri9'></sub></form><legend id='B5ri9'></legend><bdo id='B5ri9'><pre id='B5ri9'><center id='B5ri9'></center></pre></bdo></b><th id='B5ri9'></th></span></q></dt></tr></i><div id='B5ri9'><tfoot id='B5ri9'></tfoot><dl id='B5ri9'><fieldset id='B5ri9'></fieldset></dl></div>

                <legend id='B5ri9'><style id='B5ri9'><dir id='B5ri9'><q id='B5ri9'></q></dir></style></legend>

                    <tfoot id='B5ri9'></tfoot>