Last active
December 12, 2015 05:48
-
-
Save rependa/4724013 to your computer and use it in GitHub Desktop.
js: Checks to see if there is a /fr/ folder in the url. Returns 'fr' or 'en'.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function isEnFr(){ | |
| var lang = (top.location.href.toLowerCase().indexOf("/fr/")>-1)? "fr":"en"; | |
| return lang; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment