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

Hi,


In a form view definition XML file, I used (within Studio):


   

      months

   

to display a string (unit) after the field. However, I did not find how to translate the string between in other languages.

Should I use another syntax which would allow me to add associated translations ?


Many thanks.

Ảnh đại diện
Huỷ bỏ
Tác giả

Code should be:
<label for="field_name"/>
    <div class="o_row">
      <field name="field_name"/> <span>months</span>
    </div>

Tác giả Câu trả lời hay nhất

Hi,

I finally noticed in Studio that if I open the customized view in the view editor and I click on the "EN" translation label, Studio is showing me the terms in the view with the option to fill in their translation.

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

Hi,

If you are trying to set the  translation for your custom module, you can set it from

Enable debug mode -> settings -> Translation -> export translation 


Then you can choose the language from it, and select your module to add translation


Replace the language with the language in which you need to translate and export the file.

Afte exporting a PO file will be generated, Inside that file you can make changes for the fonts that you need to add translation, after add translation you can import the saved files from settings -> translations-> import translation Or you can add the file in your custom module /custom-module/i18n/.po


Hope it helps

Ảnh đại diện
Huỷ bỏ
Tác giả

I have updated my question since the code block option removed XML tags. However, when exporting into a PO file, the string between span tags is not in the file.

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 12 24
1771
2
thg 2 24
3265
4
thg 11 23
3959
1
thg 8 22
3964
1
thg 3 21
22107