【发布时间】:2019-02-26 23:34:36
【问题描述】:
我已经安装了rainlab.location 和rainlab.translate 插件。我在后端翻译了国家和州,但我无法在前端查看它们的翻译。这是我正在使用的代码(来自文档):
{% set countryId = countryId|default(form_value('country_id')) %}
{% set stateId = stateId|default(form_value('state_id')) %}
<div class="form-group">
<label for="accountCountry">Country</label>
{{ form_select_country('country_id', countryId, {
id: 'accountCountry',
class: 'form-control',
emptyOption: '',
'data-request': 'onInit',
'data-request-update': {
'country-state': '#partialCountryState'
}
}) }}
</div>
<div class="form-group">
<label for="accountState">State</label>
{{ form_select_state('state_id', countryId, stateId, {
id: 'accountState',
class: 'form-control',
emptyOption: ''
}) }}
</div>
即使我切换了语言,它也以英语显示国家和州!
【问题讨论】:
标签: octobercms octobercms-plugins