Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3663 Lượt xem

So in `website_templates.xml` in the website module, there is the template for the searchbox with id `website_search_box`. I'm not using the widget but the template is inherited and used in website_sale on the product page and shop page.


`t-att-placeholder="placeholder if placeholder else 'Search...'"`


I can't find where to define the placeholder variable nor where to translate the `Search...`.

So I inherited the template and set the placeholder value (t-set and t-value) but it seems that this string also isn't translatable.

Where can I either, set the searchbox placeholder or make translatable the string I'll set in the template ?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

In odoo website for placeholder, you can translate them using an editor of the website, no need to add any code for that.

Just go to the website click on the translate button and you can find a placeholder is visible with yellow color so when you click on that, you can change the string and save.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 6 23
3950
2
thg 6 22
3545
1
thg 4 22
2389
0
thg 2 22
4649
1
thg 1 22
2366