SlideShare a Scribd company logo
1 of 142
2009.3.21
Monday, March 23, 2009
Monday, March 23, 2009
Monday, March 23, 2009
orz




Monday, March 23, 2009
orz




Monday, March 23, 2009
orz




Monday, March 23, 2009
orz




                         (   PLC etc)




Monday, March 23, 2009
orz




                                  (   PLC etc)

                         iPhone
                         (            )




Monday, March 23, 2009
Monday, March 23, 2009
Monday, March 23, 2009
Monday, March 23, 2009
Monday, March 23, 2009
Monday, March 23, 2009
Monday, March 23, 2009
iPhone




Monday, March 23, 2009
iPhone

                         iUnitTest
                         iPhone Testing
                         Open Source




Monday, March 23, 2009
iPhone

                         iUnitTest
                         iPhone Testing
                         Open Source


                         AppStore

Monday, March 23, 2009
Monday, March 23, 2009
Monday, March 23, 2009
iPhone
Monday, March 23, 2009
Monday, March 23, 2009
Monday, March 23, 2009
iPhone
Monday, March 23, 2009
Monday, March 23, 2009
Monday, March 23, 2009
Monday, March 23, 2009
Monday, March 23, 2009
Monday, March 23, 2009
Monday, March 23, 2009
Monday, March 23, 2009
request
Monday, March 23, 2009
Monday, March 23, 2009
How
Monday, March 23, 2009
Rails
Monday, March 23, 2009
i18n
Monday, March 23, 2009
i18n
Monday, March 23, 2009
Monday, March 23, 2009
18
    Internatio
    nalization
Monday, March 23, 2009
Monday, March 23, 2009
L10n
Monday, March 23, 2009
Localiz
             ation
Monday, March 23, 2009
Monday, March 23, 2009
Monday, March 23, 2009
L12y
Monday, March 23, 2009
M17n
Monday, March 23, 2009
Monday, March 23, 2009
Monday, March 23, 2009
Monday, March 23, 2009
Mozilla
                         http://www.mozilla-japan.org/docs/refList/
                         i18n/

                         FreeBSD
                         Chapter 16.        (localization) - I18N/L10N


                         http://www.freebsd.org/doc/ja/books/
                         handbook/l10n.html

Monday, March 23, 2009
-    .           .etc

                         ja-JP       -
                         en-US       -
                         en-UK       -
                         zh-TW           -
Monday, March 23, 2009
Rails
Monday, March 23, 2009
Monday, March 23, 2009
2.2
Monday, March 23, 2009
2.3
Monday, March 23, 2009
Monday, March 23, 2009
Rails
                         2.2.2
Monday, March 23, 2009
rails i18n_test


Monday, March 23, 2009
config/locales




Monday, March 23, 2009
en.yml
                         en:
                          hello: quot;Hello worldquot;
                                 ja.yml
                         ja:
                           hello: quot;         quot;
Monday, March 23, 2009
View


                 script/generate controller hello index
                 app/views/hello.index.html.erb

                         t :hello %>
                 <%=



Monday, March 23, 2009
(ja-JP)

                         Mozilla/5.0 (Macintosh; U; Intel
                           Mac OS X 10_5_6; ja-jp)




Monday, March 23, 2009
(en-US)

                         Mozilla/5.0 (Macintosh; U; Intel
                           Mac OS X 10_5_6; en-us)




Monday, March 23, 2009
!
Monday, March 23, 2009
Monday, March 23, 2009
Monday, March 23, 2009
ApplicationController
           class ApplicationController <
           ActionController::Base

                  before_filter :set_locale

                  def set_locale
                    I18n.locale = params[:locale]
                  end

           end
Monday, March 23, 2009
Monday, March 23, 2009
request

Monday, March 23, 2009
ApplicationController

           class ApplicationController < ActionController::Base

               before_filter :set_locale

               def set_locale
                  locale_request =
                     request.cgi.accept_language.split('.').first
                 I18n.locale = params[:locale] || locale_request
               end

           end




Monday, March 23, 2009
Monday, March 23, 2009
ja-JP   ja


Monday, March 23, 2009
ApplicationController

           class ApplicationController < ActionController::Base

               before_filter :set_locale

               def set_locale
                  locale_request =

                         request.cgi.accept_language.split('-').first
                 I18n.locale = params[:locale] || locale_request
               end

           end




Monday, March 23, 2009
Monday, March 23, 2009
Monday, March 23, 2009
Monday, March 23, 2009
View




Monday, March 23, 2009
View


                         Validation




Monday, March 23, 2009
config/environment.rb

                          Rails::Initializer.run do |config|
                               .
                               .
                           config.i18n.default_locale = :ja
                          end


                         ApplicationController


Monday, March 23, 2009
Monday, March 23, 2009
Monday, March 23, 2009
Monday, March 23, 2009
ja:
             index:
               sentence1: “                                   Apache


                                        ”
                sentence2: “                                                 ?”
                sentence3: “                                  web


                  web                   The Apache Software Foundation            web
                                                                         ”
              sentence4: “Apache                        web
                               Apache             web                             Apache
                                            !”




Monday, March 23, 2009
Monday, March 23, 2009
yml




Monday, March 23, 2009
yml




Monday, March 23, 2009
yml




Monday, March 23, 2009
yml




Monday, March 23, 2009
yml




Monday, March 23, 2009
yml

                            sentence1

                         Image   sentence2

                            sentence3



Monday, March 23, 2009
Monday, March 23, 2009
View




Monday, March 23, 2009
View

                           Rails2.2




Monday, March 23, 2009
View

                           Rails2.2




Monday, March 23, 2009
Ruby-Locale for Ruby on
                         Rails

                         http://www.yotabanana.com/hiki/ja/ruby-
                         locale-rails-howto.html




Monday, March 23, 2009
Ruby-Locale for Ruby on
                         Rails

                          http://www.yotabanana.com/hiki/ja/ruby-
                          locale-rails-howto.html



                         sudo gem install locale
                         sudo gem install locale-rails


Monday, March 23, 2009
config/environment.rb
                         Rails::Initializer.run do |config|
                              .
                              .
                          config.gem 'locale'
                          config.gem 'locale_rails'
                         end

                         ApplicationController


Monday, March 23, 2009
app/views/hello/index_ja.html.erb



                                index_ja.html.erb




Monday, March 23, 2009
params[:lang]




                            ja-JP        ja




Monday, March 23, 2009
Monday, March 23, 2009
Monday, March 23, 2009
en




Monday, March 23, 2009
config/initializers/
                              locales.rb

                         http://www.yotabanana.com/lab/
                         20081209.html




Monday, March 23, 2009
config/initializers/
                              locales.rb

                         http://www.yotabanana.com/lab/
                         20081209.html

               I18n.supported_locales = [quot;jaquot;, quot;enquot;]




Monday, March 23, 2009
config/initializers/
                              locales.rb

                         http://www.yotabanana.com/lab/
                         20081209.html

               I18n.supported_locales = [quot;jaquot;, quot;enquot;]


                               Rails2.2


Monday, March 23, 2009
Monday, March 23, 2009
iPhone




Monday, March 23, 2009
iPhone


                         TankEngine
                         http://www.pathf.com/showcase/open-source-
                         projects/tank-engine/




Monday, March 23, 2009
iPhone


                         TankEngine
                         http://www.pathf.com/showcase/open-source-
                         projects/tank-engine/

                           jRails




Monday, March 23, 2009
TankEngine

                         install

               ./script/plugin install http://ennerchi.googlecode.com/
               svn/trunk/plugins/jrails

               ./script/plugin install git://github.com/noelrappin/tank-
               engine.git


               rake tank_engine:install

Monday, March 23, 2009
TankEngine

                         Form
                         jQuery   iPhone like




                                                OK



Monday, March 23, 2009
ApplicationController

                         acts_as_iphone_controller




                  class ApplicationController < ActionController::Base
                    acts_as_iphone_controller
                      .
                      .
                      .
                  end




Monday, March 23, 2009
app/views/hello/index.iphone.erb




Monday, March 23, 2009
Monday, March 23, 2009
index.html.erb
              index.iphone.erb
              index_ja.html.erb
              index_ja.iphone.erb

Monday, March 23, 2009
index.html.erb
              index.iphone.erb
              index_ja.html.erb
              index_ja.iphone.erb

Monday, March 23, 2009
<%= render :partial => ‘index’ %>

           index.html.erb                       _index.html.erb

           index.iphone.erb
                         <%= render :partila => ‘index_ja’ %>
           index_ja.html.erb
                                                _index_ja.html.erb
           index_ja.iphone.erb

Monday, March 23, 2009
<%= render :partial => ‘menu’ %>   <%= render :partial => ‘menu’ %>


         index.html.erb             _menu.html.erb
                                                             __menu.html.erb
         index.iphone.erb           _menu.iphone.erb




Monday, March 23, 2009
<%= render :partial => ‘menu’ %>   <%= render :partial => ‘menu’ %>


         index.html.erb             _menu.html.erb
                                                             __menu.html.erb
         index.iphone.erb           _menu.iphone.erb




Monday, March 23, 2009
<%= render :partial => ‘menu’ %>   <%= render :partial => ‘menu’ %>


         index.html.erb             _menu.html.erb
                                                             __menu.html.erb
         index.iphone.erb           _menu.iphone.erb




Monday, March 23, 2009
<%= render :partial => ‘menu’ %>   <%= render :partial => ‘menu’ %>


         index.html.erb             _menu.html.erb
                                                             __menu.html.erb
         index.iphone.erb           _menu.iphone.erb




                                                      -
Monday, March 23, 2009
OK




Monday, March 23, 2009
OK




Monday, March 23, 2009
OK


                         Mac   iPhone




Monday, March 23, 2009
OK


                         Mac    iPhone

                         subdomain




Monday, March 23, 2009
OK


                         Mac    iPhone

                         subdomain


                           http://iphone.itosoft.com/




Monday, March 23, 2009
subdomain

                             subdomain
                  class ApplicationController < ActionController::Base
                    acts_as_iphone_controller :subdomain => 'ignore'
                    # ignore
                         #
                         # nil   iPhone
                         .
                             .
                             .
                  end




Monday, March 23, 2009
iPhone




Monday, March 23, 2009
iPhone




Monday, March 23, 2009
iPhone


                         ?iphone_help=




Monday, March 23, 2009
iPhone


                         ?iphone_help=




Monday, March 23, 2009
iPhone


                         ?iphone_help=




Monday, March 23, 2009
iPhone


                         ?iphone_help=




                           Mechanize




Monday, March 23, 2009
iPhone


                         ?iphone_help=




                           Mechanize
                           Nokogiri


Monday, March 23, 2009
iPhone


                           docup.rb
                                           http:/ /
                                                 /
                                            http:/ /
                                            http:/ /
                                             http:/
                                      iPhone.itosoft.
                                       iPhone.itosoft.
                                        iPhone.itosoft.
                                         iPhone.itosoft.
                                           com/...
                                            com/...
                                             com/...
                                              com/...




Monday, March 23, 2009
Monday, March 23, 2009
config/environment.rb

                           config.i18n.default_locale = :ja

                         config/initializers/locales.rb

                           I18n.supported_locales = [quot;jaquot;]




Monday, March 23, 2009
Ruby-Locale for Ruby on Rails
                         sudo gem install locale
                         sudo gem install locale-rails

                         config/environment.rb
                         config.gem 'locale'
                         config.gem 'locale_rails'



Monday, March 23, 2009
iPhone
                         TankEngine
                         ./script/plugin install http:/ /
                         ennerchi.googlecode.com/svn/trunk/plugins/
                         jrails
                         ./script/plugin install git://github.com/
                         noelrappin/tank-engine.git
                         rake tank_engine:install

                         ApplicationController
                          acts_as_iphone_controller


Monday, March 23, 2009
Monday, March 23, 2009
iPhone




Monday, March 23, 2009
iPhone




Monday, March 23, 2009
Monday, March 23, 2009

More Related Content

Similar to Internationalization of your homepage

Designing Rules ~ IA Summit 2009
Designing Rules ~ IA Summit 2009Designing Rules ~ IA Summit 2009
Designing Rules ~ IA Summit 2009Dan Brown
 
Palestra no Grupo Sou Java
Palestra no Grupo Sou JavaPalestra no Grupo Sou Java
Palestra no Grupo Sou JavaFabio Akita
 
Ruby On Rails Presentation Barcamp Antwerp.Key
Ruby On Rails Presentation Barcamp Antwerp.KeyRuby On Rails Presentation Barcamp Antwerp.Key
Ruby On Rails Presentation Barcamp Antwerp.KeyBert Goethals
 
The Craftsman Developer In An Agile World
The Craftsman Developer In An Agile WorldThe Craftsman Developer In An Agile World
The Craftsman Developer In An Agile WorldOpenAgile Romania
 
Promiscuous Drupal
Promiscuous DrupalPromiscuous Drupal
Promiscuous DrupalJeff Eaton
 
OpenID DrupalCon 2009
OpenID DrupalCon 2009OpenID DrupalCon 2009
OpenID DrupalCon 2009James Walker
 
Huffduffer
HuffdufferHuffduffer
Huffdufferadactio
 
Agile Development no Yahoo! com Scrum - Campus Party 2009 - em português
Agile Development no Yahoo! com Scrum - Campus Party 2009 - em portuguêsAgile Development no Yahoo! com Scrum - Campus Party 2009 - em português
Agile Development no Yahoo! com Scrum - Campus Party 2009 - em portuguêsAntonio Silveira
 
Termtter 2009-03-14
Termtter 2009-03-14Termtter 2009-03-14
Termtter 2009-03-14jugyo kohno
 
JRuby on Rails
JRuby on RailsJRuby on Rails
JRuby on RailsFabio Kung
 
Liebe Dein Frontend wie Dich selbst! HAML & SASS & COMPASS & less
Liebe Dein Frontend wie Dich selbst! HAML & SASS & COMPASS & lessLiebe Dein Frontend wie Dich selbst! HAML & SASS & COMPASS & less
Liebe Dein Frontend wie Dich selbst! HAML & SASS & COMPASS & lessjan_mindmatters
 
Rack Middleware
Rack MiddlewareRack Middleware
Rack MiddlewareJon Crosby
 
Fork CMS 3.5 changes
Fork CMS 3.5 changesFork CMS 3.5 changes
Fork CMS 3.5 changesFork-CMS
 

Similar to Internationalization of your homepage (16)

Designing Rules ~ IA Summit 2009
Designing Rules ~ IA Summit 2009Designing Rules ~ IA Summit 2009
Designing Rules ~ IA Summit 2009
 
Palestra no Grupo Sou Java
Palestra no Grupo Sou JavaPalestra no Grupo Sou Java
Palestra no Grupo Sou Java
 
Becoming Indie
Becoming IndieBecoming Indie
Becoming Indie
 
Ruby On Rails Presentation Barcamp Antwerp.Key
Ruby On Rails Presentation Barcamp Antwerp.KeyRuby On Rails Presentation Barcamp Antwerp.Key
Ruby On Rails Presentation Barcamp Antwerp.Key
 
The Craftsman Developer In An Agile World
The Craftsman Developer In An Agile WorldThe Craftsman Developer In An Agile World
The Craftsman Developer In An Agile World
 
Promiscuous Drupal
Promiscuous DrupalPromiscuous Drupal
Promiscuous Drupal
 
OpenID DrupalCon 2009
OpenID DrupalCon 2009OpenID DrupalCon 2009
OpenID DrupalCon 2009
 
Huffduffer
HuffdufferHuffduffer
Huffduffer
 
Conférence Tic 09
Conférence Tic 09Conférence Tic 09
Conférence Tic 09
 
Agile Development no Yahoo! com Scrum - Campus Party 2009 - em português
Agile Development no Yahoo! com Scrum - Campus Party 2009 - em portuguêsAgile Development no Yahoo! com Scrum - Campus Party 2009 - em português
Agile Development no Yahoo! com Scrum - Campus Party 2009 - em português
 
Termtter 2009-03-14
Termtter 2009-03-14Termtter 2009-03-14
Termtter 2009-03-14
 
Desk To Mobile
Desk To MobileDesk To Mobile
Desk To Mobile
 
JRuby on Rails
JRuby on RailsJRuby on Rails
JRuby on Rails
 
Liebe Dein Frontend wie Dich selbst! HAML & SASS & COMPASS & less
Liebe Dein Frontend wie Dich selbst! HAML & SASS & COMPASS & lessLiebe Dein Frontend wie Dich selbst! HAML & SASS & COMPASS & less
Liebe Dein Frontend wie Dich selbst! HAML & SASS & COMPASS & less
 
Rack Middleware
Rack MiddlewareRack Middleware
Rack Middleware
 
Fork CMS 3.5 changes
Fork CMS 3.5 changesFork CMS 3.5 changes
Fork CMS 3.5 changes
 

Internationalization of your homepage

Editor's Notes