Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/web/templates/site.conf.erb

Issue 29487668: Issue 5402 - Extract language and region from ?fb_locale (Closed)
Patch Set: Created July 12, 2017, 3:39 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/web/templates/site.conf.erb
diff --git a/modules/web/templates/site.conf.erb b/modules/web/templates/site.conf.erb
index 538ff66bb2d606b55393d2fc92d2f82e158e6959..3e709563295d72e3b8a7df18b8b3e6ff003b4b07 100644
--- a/modules/web/templates/site.conf.erb
+++ b/modules/web/templates/site.conf.erb
@@ -26,6 +26,12 @@ location /
set $preferredRegion $1;
}
+ if ($arg_fb_locale ~ ^(\w\w)_(\w\w)$)
+ {
+ set $preferredLang $1;
+ set $preferredRegion $2;
+ }
+
# Redirect canonical URLs to language-specific versions
if (-e "$document_root/${preferredLang}_$preferredRegion$uri")
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld