Permalink
Browse files

Adding Locale to facebook plugin

  • Loading branch information...
1 parent 82d0c89 commit 8c08bb850e6980b2899475a64053c09580a4dcfa tbaker committed Mar 13, 2011
Showing with 458 additions and 423 deletions.
  1. +1 −0 .gitignore
  2. +1 −0 config/facebook.php.example
  3. +1 −1 libs/facebook_info.php
  4. +12 −2 readme.markdown
  5. +443 −420 views/helpers/facebook.php
View
@@ -0,0 +1 @@
+*~
@@ -9,6 +9,7 @@ $config = array(
'apiKey' => 'YOUR_API_KEY',
'secret' => 'YOUR_SECRET',
'cookie' => true,
+ 'locale' => 'en_US',
)
);
?>
View
@@ -54,7 +54,7 @@ static function getConfig($key = null){
* @return string version number
*/
static function version(){
- return '2.4';
+ return '2.4.1';
}
/**
View
@@ -1,6 +1,6 @@
# Facebook Plugin
* Author: Nick Baker (nick@webtechnick.com)
-* version 2.4
+* version 2.4.1
* http://www.webtechnick.com
* license: MIT
@@ -41,6 +41,7 @@ The purpose of the Facebook plugin is to provide a seamless way to connect your
* 2.3.0: Added new Facebook::likebox to replace Facebook::fanbox()
* 2.3.1: Security Update: facebook user creation now generates random passwords.
* 2.4.0: Adding three Authentication callbacks: beforeFacebookSave, beforeFacebookLogin, and afterFacebookLogin
+* 2.4.1: Adding custom locale to plugin.
# About Plugin
* Blog: <http://www.webtechnick.com/blogs/view/229/CakePHP_Facebook_Plugin_Auth_Facebook_and_more>
@@ -78,10 +79,11 @@ Once installed, if you wish to use any other features *other* than the share but
//app/config/facebook.php
$config = array(
'Facebook' => array(
- 'appId' => 'YOUR_APP_ID',
+ 'appId' => 'YOUR_APP_ID',
'apiKey' => 'YOUR_API_KEY',
'secret' => 'YOUR_SECRET',
'cookie' => true,
+ 'locale' => 'en_US',
)
);
@@ -204,6 +206,14 @@ PHP version 5.2.x
PHP 5.3.x
FB::api('/me');
+
+
+# Internationalization
+You can set the locale of the plugin through the helper declaration or through the `config/facebook.php` configuration file (see top of document).
+
+ var $helpers = array('Facebook.Facebook' => array('locale' => 'en_US'));
+
+Facebook locales: <http://developers.facebook.com/docs/internationalization/>
# Read the Docs
Oops, something went wrong.

0 comments on commit 8c08bb8

Please sign in to comment.