2013-03-23 25 views

回答

1
filter :title, :label => "Change me" 
filter :description, :label => "Change Me" 
filter :user, :label => "Change Me" 

enter image description here

你也可以使用I18n.t如果你想

filter :title, :label => (I18n.t "some.key.here") 
+0

'I18n.t「some.key.here」'真的不會在加載工作。 –

0

ActiveAdmin使用metasearh,那麼下一條規則爲我工作。 (目的地 - 父模型,rateplan - 嵌套模型) 實施例:

en: 
    activerecord: 
    attributes: 
     destination: 
     rateplan: "RATEPLAN LOCALIZED NAME" 

的詳細信息:https://github.com/ernie/meta_search#localization

UPD。

一個更soulution使用fortastic規則internalizaton

en: 
    formtastic: 
    labels: 
     rateplan: "RATEPLAN LOCAIZED" 

更多信息:https://github.com/justinfrench/formtastic#internationalization-i18n

0

主動系統管理員使用formtastic渲染過濾器等形式的字段。所以你可以自定義你的過濾器,因爲formtastic'c自定義選項非常方便。例如。更改過濾標籤:只需在過濾方法中使用label: 'YOUR CUSTOM LABEL'選項。你也可以在那裏使用翻譯