<script type="text/discourse-plugin" version="0.8.20">
// Add an attribute to the <html> tag. This might help the user to style
// his header links
$('html').attr('dhp-locale', I18n.locale)
const customHeaderLinks = I18n.t(themePrefix("header_nav_link"));
if (!customHeaderLinks.length) return;
const h = require("virtual-dom").h;
const headerLinks = [];
const mobileView = api.container.lookup("site:main").mobileView;
and add a locales/en.yml
but get the [en.theme_translations.87.header_nav_link] resuilt
haha, I have an idea,
I can use this component to achieve a bilingual website,
I can creat some chinese categories and some english categories,
and ues this component as the main navigation,
the title link include in the translate locales file en.yml and zh_CN.yml
the homepage and categories page i can use a translated theme component( even it’s a static page, ) achieve.
and hide the default category-drop,
and in my think, it is good for me just use two language in our website.