In a Support topic titled Why we can’t add groups to top menu, adopilot asks how to add a “Groups” link to the top navigation menu, noting that the top_menu setting doesn’t support it. Falco explains that the setting only applies to topic listings and provides a JavaScript workaround using Discourse.ExternalNavItem to inject a Groups link into the menu via the </head> customization. adopilot confirms it works and notes that Categories — though not topic listings — are supported, suggesting a discrepancy. Later, xiasummer asks how to translate the “Groups” label into Chinese (“群组”) using the same script. dax advises changing the title value directly to “群组”. xiasummer confirms success and suggests the method is adaptable to other languages. dax adds that users can adjust the locale (e.g., zh_CN) and corresponding text as needed. schungx warns that only en and the user’s current locale are loaded by default, recommending a conditional check: if (I18n.translations.zh_CN) ... to avoid errors. Finally, Johani notes that this is now achievable more cleanly via a theme component, making custom top menu links easier to manage without custom JS.
Change I18n.translations.zh_CN.js.filters.groups = { title: "Groups", help: "See the Groups" };
to I18n.translations.zh_CN.js.filters.groups = { title: "群组", help: "See the Groups" };