use :locale parameter in options to set locale of fb-connect javascript assets
This commit is contained in:
parent
9ab4a4603e
commit
2a326d141e
@ -7,6 +7,7 @@ module Facebooker2
|
||||
cookie = opts[:cookie]
|
||||
status = opts[:status]
|
||||
xfbml = opts[:xfbml]
|
||||
locale = options[:locale] || "en_US"
|
||||
extra_js = capture(&proc) if block_given?
|
||||
js = <<-JAVASCRIPT
|
||||
<script>
|
||||
@ -25,7 +26,7 @@ module Facebooker2
|
||||
s.setAttribute('id','fb-root');
|
||||
document.documentElement.getElementsByTagName("HEAD")[0].appendChild(s);
|
||||
var e = document.createElement('script');
|
||||
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
|
||||
e.src = document.location.protocol + '//connect.facebook.net/#{locale}/all.js';
|
||||
e.async = true;
|
||||
s.appendChild(e);
|
||||
}());
|
||||
|
Loading…
Reference in New Issue
Block a user