Created
April 15, 2012 19:54
-
-
Save julienrf/2394512 to your computer and use it in GitHub Desktop.
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
| object Application extends Controller with PathLang { | |
| def index = Ok(html.index()) | |
| } |
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
| trait PathLang extends Controller { | |
| override def lang(implicit request: RoutedRequest) = | |
| request.pathParams.get("lang").map(Lang(_)).getOrElse(super.lang) | |
| } |
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
| GET /:lang/index controllers.Application.index |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment