如何在不破解核心文件或使用String Override插件的情况下更改Drupal的一些默认菜单字符串?

时间:2023-01-24 17:16:23

If you need more details, let me know.

如果您需要更多详细信息,请与我们联系。

EDIT: Changed title for clarity purposes.

编辑:为清晰起见更改了标题。

6 个解决方案

#1


2  

If you use Drupal 6 you have access to the menu_alter and menu_link_alter hooks. if you can't make the needed changes via the regular administration options you could create a module which implements one or both of these hooks so that you can change the generated menu items when the menu_router table contents are built.

如果你使用Drupal 6,你可以访问menu_alter和menu_link_alter钩子。如果您无法通过常规管理选项进行所需的更改,则可以创建一个实现其中一个或两个钩子的模块,以便在构建menu_router表内容时更改生成的菜单项。

#3


1  

Drupal provides Translations at their website...

Drupal在他们的网站上提供翻译......

http://drupal.org/project/Translations

#4


1  

Generally, this functionality would implemented via the locale module, which is part of Drupal core. The module is very easy to use for a situation like this. Simply enable it, then go to the settings page; add a "language" (just a custom set of translation strings for your site) and then enter the string you want to translate and the translation.

通常,此功能将通过locale模块实现,该模块是Drupal核心的一部分。该模块非常易于使用,适用于这种情况。只需启用它,然后转到设置页面;添加“语言”(只是您网站的一组自定义翻译字符串),然后输入您要翻译的字符串和翻译。

If you're running Drupal 5, you might also want to check out the localizer module for additional options.

如果您正在运行Drupal 5,您可能还需要查看本地化程序模块以获取其他选项。

#5


1  

You could just create an alias for it. For instance make one for "forums" to point to alias "forum."

你可以为它创建一个别名。例如,为“论坛”指定一个指向别名“论坛”。

#6


1  

If you're simply looking to change the title of say, the 'My account' page or 'Create content' page, or any other default Drupal page, for that matter, you can modify the menu items themselves by heading to 'domain.com/admin/build/menu/list'.

如果您只是想更改说的标题,“我的帐户”页面或“创建内容”页面,或任何其他默认的Drupal页面,则可以通过前往“域”来修改菜单项本身。 COM /管理/建设/菜单/列表”。

For example, if you wanted to change the title of 'My account' to 'Your account', you would find the menu titled 'Navigation' within the menu listing page at '/admin/build/menu/list'. The 'Navigation' menu is located at '/admin/build/menu-customize/navigation'. Find the menu item 'My account', and click 'Edit'. From there, you can modify the title of the menu item.

例如,如果您想将“我的帐户”的标题更改为“您的帐户”,您会在“/ admin / build / menu / list”的菜单列表页面中找到标题为“导航”的菜单。 “导航”菜单位于“/ admin / build / menu-customize / navigation”。找到菜单项“我的帐户”,然后点击“修改”。从那里,您可以修改菜单项的标题。

#1


2  

If you use Drupal 6 you have access to the menu_alter and menu_link_alter hooks. if you can't make the needed changes via the regular administration options you could create a module which implements one or both of these hooks so that you can change the generated menu items when the menu_router table contents are built.

如果你使用Drupal 6,你可以访问menu_alter和menu_link_alter钩子。如果您无法通过常规管理选项进行所需的更改,则可以创建一个实现其中一个或两个钩子的模块,以便在构建menu_router表内容时更改生成的菜单项。

#2


#3


1  

Drupal provides Translations at their website...

Drupal在他们的网站上提供翻译......

http://drupal.org/project/Translations

#4


1  

Generally, this functionality would implemented via the locale module, which is part of Drupal core. The module is very easy to use for a situation like this. Simply enable it, then go to the settings page; add a "language" (just a custom set of translation strings for your site) and then enter the string you want to translate and the translation.

通常,此功能将通过locale模块实现,该模块是Drupal核心的一部分。该模块非常易于使用,适用于这种情况。只需启用它,然后转到设置页面;添加“语言”(只是您网站的一组自定义翻译字符串),然后输入您要翻译的字符串和翻译。

If you're running Drupal 5, you might also want to check out the localizer module for additional options.

如果您正在运行Drupal 5,您可能还需要查看本地化程序模块以获取其他选项。

#5


1  

You could just create an alias for it. For instance make one for "forums" to point to alias "forum."

你可以为它创建一个别名。例如,为“论坛”指定一个指向别名“论坛”。

#6


1  

If you're simply looking to change the title of say, the 'My account' page or 'Create content' page, or any other default Drupal page, for that matter, you can modify the menu items themselves by heading to 'domain.com/admin/build/menu/list'.

如果您只是想更改说的标题,“我的帐户”页面或“创建内容”页面,或任何其他默认的Drupal页面,则可以通过前往“域”来修改菜单项本身。 COM /管理/建设/菜单/列表”。

For example, if you wanted to change the title of 'My account' to 'Your account', you would find the menu titled 'Navigation' within the menu listing page at '/admin/build/menu/list'. The 'Navigation' menu is located at '/admin/build/menu-customize/navigation'. Find the menu item 'My account', and click 'Edit'. From there, you can modify the title of the menu item.

例如,如果您想将“我的帐户”的标题更改为“您的帐户”,您会在“/ admin / build / menu / list”的菜单列表页面中找到标题为“导航”的菜单。 “导航”菜单位于“/ admin / build / menu-customize / navigation”。找到菜单项“我的帐户”,然后点击“修改”。从那里,您可以修改菜单项的标题。