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

The Website builder for a multilingual website seems not to support to embed pictures that are language dependent. I mean: Depending on the language the visitor has choosen, the displayed picture is different.

One can work around this restriction by editing the Webpage in the Backend and add something like

<t t-set="language_dependent_picture_path" t-if="lang == 'en_US'" t-value="'/web/image/1'"/>
<t t-set="language_dependent_picture_path" t-if="lang == 'de_DE'" t-value="'/web/image/2'"/>

 <img ....   t-att-src="language_dependent_picture_path" />     (Instead of the usual "src" attribute)

But after doing this the frontend website builder is to a large extend not usable anymore and one is restricted to use the backend which is not nice.

Any ideas for a better solution? We are using Odoo Version 11, self Hosted.

With Kind regards,

Torsten Fimmel

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

@Torsten When you able to solve this issue?

BR

Moritz

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

Hi,

one of the options is to make a computed field (binary or ref to ir.attachment) in backend which will calculate an image based on language in context. In frontend such image would not be possible to change, but the rest of page will be fine

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 10 23
2702
0
thg 2 23
76
0
thg 10 15
5010
4
thg 5 25
6889
2
thg 1 25
2494