# Announcement Bar

**URL:** https://meta.discourse.org/t/announcement-bar/286352
**Category:** Theme component
**Created:** [November 22, 2023, 5:50pm UTC](https://meta.discourse.org/t/announcement-bar/286352 "2023-11-22T17:50:08Z")
**Posts on this page:** 1
**Showing post:** 31

<div class="post-metadata">

### Author: ![manuel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/manuel/32/468169_2.png) [@manuel](https://meta.discourse.org/u/manuel)
#### Post date: [May 28, 2026, 12:30pm UTC](https://meta.discourse.org/t/announcement-bar/286352/31 "2026-05-28T12:30:17Z")

</div>

I made a few updates to the component. Already updated the original post, but here are the changes in more detail:

### Localized strings

The bar text and button label are now translatable. Instead of the old bar\_text and button\_text settings, the strings live in locales/en.yml. You can add additional locales manually or use AI translations.

### Simpler dismiss logic

Replaced the cookie-based dismiss with localStorage. The key is derived from the bar text itself, so when you update the announcement text, the bar automatically re-appears for everyone who dismissed the old one.

### Responsive layout

Consolidated styles into a single file using flex-wrap. On wide screens, the text and button sit inline. When the text wraps, the button drops below.

### BEM element classes

The markup now uses BEM classes for all elements (\_\_text, \_\_button, \_\_close) making it easier to target in theme overrides.

---

_[View the full topic](https://meta.discourse.org/t/announcement-bar/286352)._
