diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index c945e24..2488c5b 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -134,9 +134,17 @@ class NewsController < ApplicationController } end + if I18n.locale.to_s == 'zh_tw' + subtitle = a.subtitle.truncate(100) + elsif I18n.locale.to_s == 'en' + subtitle = a.subtitle.truncate(200) + end + + + { "title" => HTMLEntities.new.encode(a.title), - "subtitle" => a.subtitle.truncate(100), + "subtitle" => subtitle, "statuses" => statuses, "category" => a.category.title, "postdate" => a.postdate,