Browse files

Language option

  • Loading branch information...
1 parent 64d3de0 commit 4564d67b03231b04b9c251a38d1ca6acd2ccfd11 Alex committed Feb 23, 2014
Showing with 14 additions and 0 deletions.
  1. +6 −0 README.md
  2. +8 −0 google-plus-signin.js
View
6 README.md
@@ -13,6 +13,12 @@ A good starting place for a Google Plus sign-in button. Specify your client id a
4. Create a listener on your `$scope` for `event:google-plus-signin-success` to detect when your users are authenticated.
5. *Optional:* Listen for `event:google-plus-signin-failure` to handle authentication errors and sign outs.
+## Options
+1. Language ([supported languages](https://developers.google.com/+/web/api/supported-languages)):
+```html
+ <google-plus-signin clientid="620125449078" language="sv"></google-plus-signin>
+```
+
## Bower
Installable via `bower`:
View
8 google-plus-signin.js
@@ -35,6 +35,14 @@ angular.module('directive.g+signin', []).
}
});
+ // Default language
+ // Supported languages: https://developers.google.com/+/web/api/supported-languages
+ attrs.$observe('language', function(value){
+ window.___gcfg = {
+ lang: value ? value : 'en'
+ };
+ });
+
// Asynchronously load the G+ SDK.
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;

0 comments on commit 4564d67

Please sign in to comment.