# 为主题和主题组件添加可本地化字符串

**URL:** <https://meta.discourse.org/t/add-localizable-strings-to-themes-and-theme-components/109867>\
**Category:** Developer Guides\
**Tags:** how-to, theme-guides\
**Created:** [2019年二月22日 22:21 UTC](https://meta.discourse.org/t/add-localizable-strings-to-themes-and-theme-components/109867 "2019-02-22T22:21:45Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![Jerome\_Hordies](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jerome_hordies/32/267141_2.png) [@Jerome\_Hordies](https://meta.discourse.org/u/Jerome_Hordies)\
**Post date:** [2022年七月16日 22:17 UTC](https://meta.discourse.org/t/add-localizable-strings-to-themes-and-theme-components/109867/12 "2022-07-16T22:17:36Z")

</div>

感谢 @Don

我忘了提插件没有安装，并且我已经尝试将 data-template-name 更改为随机的 UNIQUE-NAME，结果相同，或者如果我编造了 PLUGIN-OUTLET-NAME，我的横幅根本不显示。  
你现在可能已经看出来了，我对 handlebars/ember 完全不熟悉 🙂  
我的理解是，我正在自定义一个在 html 中有预定义位置的模板，结果是自定义的 html 不再位于 /html/body/section main，而是深埋在里面，导致了我以前没有的 CSS 继承。  
我不明白为什么我需要自定义任何模板来使用翻译……  
我设法使用 [Ember inspector](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi) 识别了要自定义的模板，正如[这里](https://meta.discourse.org/t/best-strategy-for-finding-the-right-template-to-edit/153598/2)建议的那样。  
感谢你的回答和关于 plugin-outlet 的链接，我找到了正确的 data-template-name=“/connectors/above-site-header/my-navbar”  
再次感谢你的帮助

---

_[View the full topic](https://meta.discourse.org/t/add-localizable-strings-to-themes-and-theme-components/109867)._
