You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 62ae123
Browse filesBrowse the repository at this point in the historyBrowse files
/** Show flags in language selector (default: true) */
161
208
showFlags?:boolean;
209
+
/** Override the built-in English UI text — any key you omit keeps its default */
210
+
labels?:Partial<NavBarLabels>;
162
211
/** Additional CSS classes */
163
212
className?:string;
164
213
}
165
214
```
166
215
216
+
### NavBarLabels
217
+
218
+
```ts
219
+
exportinterfaceNavBarLabels {
220
+
/** Accessible label for the language list (default: "Select language") */
221
+
listbox:string;
222
+
/** Accessible label for the language menu triggers (default: "Current language: {name}") */
223
+
current: (name:string) =>string;
224
+
/** Accessible label for the mobile menu button (default: "Toggle menu") */
225
+
toggleMenu:string;
226
+
/** Accessible label for the GitHub icon link (default: "GitHub") */
227
+
github:string;
228
+
}
229
+
```
230
+
231
+
## Translation Widget
232
+
233
+
### TranslationWidgetLabels
234
+
235
+
```ts
236
+
exportinterfaceTranslationWidgetLabels {
237
+
/** Accessible label for the swap button (default: "Swap languages") */
238
+
swap:string;
239
+
/** Accessible label for the copy button (default: "Copy translation") */
240
+
copy:string;
241
+
/** Accessible label for the copy button right after a copy (default: "Copied") */
242
+
copied:string;
243
+
/** Screen reader announcement after a copy (default: "Translation copied to clipboard") */
244
+
copiedStatus:string;
245
+
/** Accessible label for the clear button (default: "Clear source text") */
246
+
clearSource:string;
247
+
/** Screen reader word read after the character count (default: "characters") */
248
+
characters: (count:number) =>string;
249
+
}
250
+
```
251
+
167
252
## Extending Interfaces
168
253
169
254
Because Babelize Elements components are fully owned by you once installed, you can extend these interfaces directly in the component files. For example, to add a custom `meta` field to each locale, add it to the `Locale` interface in your local copy:
0 commit comments