# 自定义导航栏和页脚的本地化

**URL:** <https://meta.discourse.org/t/localisation-of-custom-navbar-and-footer/208747>\
**Category:** Development\
**Created:** [2021年十一月10日 04:53 UTC](https://meta.discourse.org/t/localisation-of-custom-navbar-and-footer/208747 "2021-11-10T04:53:35Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [2021年十一月10日 10:30 UTC](https://meta.discourse.org/t/localisation-of-custom-navbar-and-footer/208747/2 "2021-11-10T10:30:21Z")

</div>

如果将其制作成主题组件，则有内置支持：

> [@Add localizable strings to themes and theme components](https://meta.discourse.org/t/adding-localizable-strings-to-themes-and-theme-components/109867?u=merefield):
>
> For those looking to add custom languages and translations to a Discourse theme or theme component, they [can now include](https://github.com/discourse/discourse/commit/880311dd4d2b367e54cc8244fba60fce69e121c3) localised strings, which are made available for use in UI components. Translations are stored in the same format as core/plugin translations, and can be used in almost the same way. Themes can supply translation files in a format like /locales/{locale}.yml. These files should be valid YAML, with a single top level key equal to the locale being defined. These can be defined us…

---

_[View the full topic](https://meta.discourse.org/t/localisation-of-custom-navbar-and-footer/208747)._
