More Related Content Similar to Internationalization of your homepage Similar to Internationalization of your homepage (16) Internationalization of your homepage7. orz
( PLC etc)
Monday, March 23, 2009
8. orz
( PLC etc)
iPhone
( )
Monday, March 23, 2009
16. iPhone
iUnitTest
iPhone Testing
Open Source
Monday, March 23, 2009
17. iPhone
iUnitTest
iPhone Testing
Open Source
AppStore
Monday, March 23, 2009
38. 18
Internatio
nalization
Monday, March 23, 2009
41. Localiz
ation
Monday, March 23, 2009
49. 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
50. - . .etc
ja-JP -
en-US -
en-UK -
zh-TW -
Monday, March 23, 2009
56. Rails
2.2.2
Monday, March 23, 2009
59. en.yml
en:
hello: quot;Hello worldquot;
ja.yml
ja:
hello: quot; quot;
Monday, March 23, 2009
60. View
script/generate controller hello index
app/views/hello.index.html.erb
t :hello %>
<%=
Monday, March 23, 2009
61. (ja-JP)
Mozilla/5.0 (Macintosh; U; Intel
Mac OS X 10_5_6; ja-jp)
Monday, March 23, 2009
62. (en-US)
Mozilla/5.0 (Macintosh; U; Intel
Mac OS X 10_5_6; en-us)
Monday, March 23, 2009
66. ApplicationController
class ApplicationController <
ActionController::Base
before_filter :set_locale
def set_locale
I18n.locale = params[:locale]
end
end
Monday, March 23, 2009
69. 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
71. ja-JP ja
Monday, March 23, 2009
72. 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
77. View
Validation
Monday, March 23, 2009
78. config/environment.rb
Rails::Initializer.run do |config|
.
.
config.i18n.default_locale = :ja
end
ApplicationController
Monday, March 23, 2009
82. ja:
index:
sentence1: “ Apache
”
sentence2: “ ?”
sentence3: “ web
web The Apache Software Foundation web
”
sentence4: “Apache web
Apache web Apache
!”
Monday, March 23, 2009
89. yml
sentence1
Image sentence2
sentence3
Monday, March 23, 2009
92. View
Rails2.2
Monday, March 23, 2009
93. View
Rails2.2
Monday, March 23, 2009
94. Ruby-Locale for Ruby on
Rails
http://www.yotabanana.com/hiki/ja/ruby-
locale-rails-howto.html
Monday, March 23, 2009
95. 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
96. config/environment.rb
Rails::Initializer.run do |config|
.
.
config.gem 'locale'
config.gem 'locale_rails'
end
ApplicationController
Monday, March 23, 2009
102. config/initializers/
locales.rb
http://www.yotabanana.com/lab/
20081209.html
Monday, March 23, 2009
103. config/initializers/
locales.rb
http://www.yotabanana.com/lab/
20081209.html
I18n.supported_locales = [quot;jaquot;, quot;enquot;]
Monday, March 23, 2009
104. config/initializers/
locales.rb
http://www.yotabanana.com/lab/
20081209.html
I18n.supported_locales = [quot;jaquot;, quot;enquot;]
Rails2.2
Monday, March 23, 2009
107. iPhone
TankEngine
http://www.pathf.com/showcase/open-source-
projects/tank-engine/
Monday, March 23, 2009
108. iPhone
TankEngine
http://www.pathf.com/showcase/open-source-
projects/tank-engine/
jRails
Monday, March 23, 2009
109. 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
110. TankEngine
Form
jQuery iPhone like
OK
Monday, March 23, 2009
111. ApplicationController
acts_as_iphone_controller
class ApplicationController < ActionController::Base
acts_as_iphone_controller
.
.
.
end
Monday, March 23, 2009
114. index.html.erb
index.iphone.erb
index_ja.html.erb
index_ja.iphone.erb
Monday, March 23, 2009
115. index.html.erb
index.iphone.erb
index_ja.html.erb
index_ja.iphone.erb
Monday, March 23, 2009
116. <%= 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
117. <%= 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
118. <%= 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
119. <%= 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
120. <%= 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
123. OK
Mac iPhone
Monday, March 23, 2009
124. OK
Mac iPhone
subdomain
Monday, March 23, 2009
125. OK
Mac iPhone
subdomain
http://iphone.itosoft.com/
Monday, March 23, 2009
126. subdomain
subdomain
class ApplicationController < ActionController::Base
acts_as_iphone_controller :subdomain => 'ignore'
# ignore
#
# nil iPhone
.
.
.
end
Monday, March 23, 2009
129. iPhone
?iphone_help=
Monday, March 23, 2009
130. iPhone
?iphone_help=
Monday, March 23, 2009
131. iPhone
?iphone_help=
Monday, March 23, 2009
132. iPhone
?iphone_help=
Mechanize
Monday, March 23, 2009
133. iPhone
?iphone_help=
Mechanize
Nokogiri
Monday, March 23, 2009
134. iPhone
docup.rb
http:/ /
/
http:/ /
http:/ /
http:/
iPhone.itosoft.
iPhone.itosoft.
iPhone.itosoft.
iPhone.itosoft.
com/...
com/...
com/...
com/...
Monday, March 23, 2009
136. config/environment.rb
config.i18n.default_locale = :ja
config/initializers/locales.rb
I18n.supported_locales = [quot;jaquot;]
Monday, March 23, 2009
137. 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
138. 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