https://discord.gg/botpress logo
Translate Restart button and description
# 🤝help
c
I would like to also translate this text but i didnt find yet any option
p
Here is the css to add in the webchat page > theme page: /* Your CSS styles here */ .bpModalDialogContent { position: relative; } .bpModalDialogNewConversationText { visibility: hidden; position: relative; } .bpModalDialogNewConversationText:after { visibility: visible; position: absolute; top: 0; left: 0; content: "Är du säker på att du vill starta en ny konversation?"; } /* Change the button text */ .bpModalDialogNewConversationButton { color: transparent; position: relative; } .bpModalDialogNewConversationButton:after { visibility: visible; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); content: "Starta om"; color: initial; white-space: nowrap; } /* Change the title text */ .bpModalDialogTitleText { visibility: hidden; position: relative; } .bpModalDialogTitleText:after { visibility: visible; position: absolute; top: 0; left: 0; content: "Starta ny konversation"; white-space: nowrap; } /* Change the placeholder text in the input field to Swedish */ .bpComposerInput::placeholder { visibility: hidden; position: relative; } .bpComposerInput::placeholder { color: transparent; } /* Add the Swedish text as a pseudo-element */ .bpComposerInput:not(:focus):placeholder-shown::before { content: "Skriv ditt meddelande..."; position: absolute; top: 50%; left: 15px; transform: translateY(-50%); color: rgba(0, 0, 0, 0.5); pointer-events: none; } /* Alternative approach using the container */ .bpComposerContainer:has(.bpComposerInput:not(:focus):placeholder-shown)::before { content: "Skriv ditt meddelande..."; position: absolute; top: 93.8%; left: 50px; transform: translateY(-50%); color: rgba(0, 0, 0, 0.5); pointer-events: none; z-index: 1; } This Translates to Swedish, but feel free to change the statements to whichever language you prefer. Hope it helps!
c
I made small changes but it workings, thanks
b
Hello, can you send your code here please
c
Sure it is .bpModalDialogContent { position: relative; } .bpModalDialogNewConversationText { visibility: hidden; position: relative; } .bpModalDialogNewConversationText:after { visibility: visible; position: absolute; top: 0; left: 0; content: "Chcete začít novou konverzaci od začátku?"; } .bpModalDialogNewConversationButton { visibility: hidden; position: relative; } .bpModalDialogNewConversationButton:after { visibility: visible; left: 0; content: "Začít znovu"; color: initial; white-space: nowrap; padding-top: var(--bpSpacing-1); padding-bottom: var(--bpSpacing-1); padding-left: var(--bpSpacing-2); padding-right: var(--bpSpacing-2); margin-top: var(--bpSpacing-4); border-radius: calc(var(--bpRadius-scale) * var(--bpRadius-md)); color: var(--bpGray-1); background: var(--bpPrimary-500); align-self: end; cursor: pointer; } .bpModalDialogTitleText { visibility: hidden; position: relative; } .bpModalDialogTitleText:after { visibility: visible; position: absolute; top: 0; left: 0; content: "Nová konverzace?"; white-space: nowrap; } Text are in czech language