0
正如標題所示。我將如何國際化這樣的事情:如何國際化link_to確認訊息?
= link_to t('.close'), topic_path(@topic, topic: { closed: '0' }),
method: :put, confirm: 'Are you sure you want to close this topic?',
class: 'btn btn-mini', title: "Close topic '#{@topic.title}'"
我想要做的是I18n鏈接到方法的確認部分。我會怎麼做呢?我一直在玩我的topics.en.yml文件(如下所示),現在時間太長了。一些幫助將不勝感激。
en:
topics:
new:
create_topic: 'Post Topic'
create:
success: 'Topic successfully created'
error: 'Unable to successfully create topic'
show:
close: 'Close'
# close_confirm: 'Are you sure you want to close this topic?'
delete: 'Delete'
reopen: 'Re-open'
edit:
save_changes: 'Save Changes'
update:
success: 'Topic updated'
error: 'Sorry, there was a problem updating the topic'
destroy:
success: 'Topic successfully removed'
error: 'There was a problem deleting the forum'
form:
title: 'Title (required)'
enter_topic_title: 'Enter the topic title.'
message: 'Message'
first_post: 'This will be the first post'
sticky: 'Sticky'
closed: 'Closed'