diff --git a/app/controllers/admin/snippets_controller.rb b/app/controllers/admin/snippets_controller.rb
index 5678fdbb..026be61e 100644
--- a/app/controllers/admin/snippets_controller.rb
+++ b/app/controllers/admin/snippets_controller.rb
@@ -26,7 +26,7 @@ class Admin::SnippetsController < ApplicationController
end
VALID_LOCALES.each do |locale|
- @snippet.write_attribute( "content_#{locale}", "
- <%= link_to 'Home', root_path %> |
- <%= link_to 'Pages', admin_pages_path %> |
- <%= link_to 'Snippet', admin_snippets_path %> |
- <%= link_to 'Layout', admin_layouts_path %> |
- <%= link_to 'Announcement', admin_announcements_path %>
+ <%= link_to t(:home, :scope => :admin), root_path %> |
+ <%= link_to t(:page, :scope => :admin), admin_pages_path %> |
+ <%= link_to t(:snippet, :scope => :admin), admin_snippets_path %> |
+ <%= link_to t(:layout, :scope => :admin), admin_layouts_path %> |
+ <%= link_to t(:announcement, :scope => :admin), admin_announcements_path %>
<%= yield %>
diff --git a/config/environment.rb b/config/environment.rb
index e8a77c71..1f165efd 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -40,7 +40,7 @@ Rails::Initializer.run do |config|
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]
- config.i18n.default_locale = "en"
+ config.i18n.default_locale = "zh_tw"
end
diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml
new file mode 100644
index 00000000..d2527bed
--- /dev/null
+++ b/config/locales/zh_tw.yml
@@ -0,0 +1,7 @@
+zh_tw:
+ admin:
+ home: 首頁
+ page: 頁面管理
+ snippet: 片段管理
+ layout: 樣版管理
+ announcement: 公告管理
\ No newline at end of file