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
I have enabled all the culture, localization-related features, and search forms. When I used the built-in search form widget in the layout, the localization worked well when I switched to a different language. But if I created a customization widget template in the backend. The localization would not work anymore when I changed the language.
Switch to a different language, the search form always displays the English version. But if I delete the "Widget__SearchForm" template, the issue will be resolved.
Expected behavior
The localization should work well if I use the widget template created in the backend.
zh-CN:
en-US:
It seems like the "{{ "Enter your search term(s)" | t }}" code does not work in the template data.
Logs and screenshots
zh-CN:
en-US
The text was updated successfully, but these errors were encountered:
If those are custom localization resources you need to define them in PO files, try to add zh-CN.po in the Localization folder add the entires then have a try
If those are custom localization resources you need to define them in PO files, try to add zh-CN.po in the Localization folder add the entires then have a try
The "zh-CN.po" file already exists in the "Localization" folder and the translation key exists in the po file. It just doesn't work in the customization template data which was created in the backend template, but it works fine in the template file.
If I remove the template data in the admin backend, the "searchForm" will render the "SearchForm.liquid" template file in the dll file and it will work well.
It seems like the "{{ "Enter your search term(s)" | t }}" code not work in the template data context.
Describe the bug
I have enabled all the culture, localization-related features, and search forms. When I used the built-in search form widget in the layout, the localization worked well when I switched to a different language. But if I created a customization widget template in the backend. The localization would not work anymore when I changed the language.
Orchard Core version
orchardcore 2.1.0
To Reproduce
Expected behavior
The localization should work well if I use the widget template created in the backend.
zh-CN:
en-US:
It seems like the "{{ "Enter your search term(s)" | t }}" code does not work in the template data.
Logs and screenshots
zh-CN:
en-US
The text was updated successfully, but these errors were encountered: