mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 18:51:03 +01:00
fix indentation
parent
e0d16ace31
commit
3013a8c333
|
@ -182,7 +182,7 @@ func newApp() *iris.Application {
|
||||||
ctx.Writef("%s", ctx.Tr("hi", "iris"))
|
ctx.Writef("%s", ctx.Tr("hi", "iris"))
|
||||||
})
|
})
|
||||||
|
|
||||||
app.Get("/multi", func(ctx iris.Context) {
|
app.Get("/other", func(ctx iris.Context) {
|
||||||
language := ctx.GetLocale().Language()
|
language := ctx.GetLocale().Language()
|
||||||
|
|
||||||
fromFirstFileValue := ctx.Tr("key1")
|
fromFirstFileValue := ctx.Tr("key1")
|
||||||
|
@ -230,14 +230,14 @@ func main() {
|
||||||
// or http://localhost:8080/some-path?lang=el-GR
|
// or http://localhost:8080/some-path?lang=el-GR
|
||||||
// ^ (by url parameter)
|
// ^ (by url parameter)
|
||||||
//
|
//
|
||||||
// or http://localhost:8080 (default is en-US)
|
// or http://localhost:8080 (default is en-US)
|
||||||
// or http://localhost:8080/?lang=zh-CN
|
// or http://localhost:8080/?lang=zh-CN
|
||||||
//
|
//
|
||||||
// go to http://localhost:8080/multi?lang=el-GR
|
// go to http://localhost:8080/other?lang=el-GR
|
||||||
// or http://localhost:8080/multi (default is en-US)
|
// or http://localhost:8080/other (default is en-US)
|
||||||
// or http://localhost:8080/multi?lang=en-US
|
// or http://localhost:8080/other?lang=en-US
|
||||||
//
|
//
|
||||||
// or use cookies to set the language.
|
// or use cookies to set the language.
|
||||||
app.Run(iris.Addr(":8080"), iris.WithSitemap("http://localhost:8080"))
|
app.Run(iris.Addr(":8080"), iris.WithSitemap("http://localhost:8080"))
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -268,10 +268,10 @@ GET http://localhost:8080/sitemap.xml
|
||||||
<xhtml:link rel="alternate" hreflang="zh-CN" href="http://localhost:8080/zh-CN/some-path"></xhtml:link>
|
<xhtml:link rel="alternate" hreflang="zh-CN" href="http://localhost:8080/zh-CN/some-path"></xhtml:link>
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>http://localhost:8080/multi</loc>
|
<loc>http://localhost:8080/other</loc>
|
||||||
<xhtml:link rel="alternate" hreflang="en-US" href="http://localhost:8080/multi"></xhtml:link>
|
<xhtml:link rel="alternate" hreflang="en-US" href="http://localhost:8080/other"></xhtml:link>
|
||||||
<xhtml:link rel="alternate" hreflang="el-GR" href="http://localhost:8080/el-GR/multi"></xhtml:link>
|
<xhtml:link rel="alternate" hreflang="el-GR" href="http://localhost:8080/el-GR/other"></xhtml:link>
|
||||||
<xhtml:link rel="alternate" hreflang="zh-CN" href="http://localhost:8080/zh-CN/multi"></xhtml:link>
|
<xhtml:link rel="alternate" hreflang="zh-CN" href="http://localhost:8080/zh-CN/other"></xhtml:link>
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>http://localhost:8080/templates</loc>
|
<loc>http://localhost:8080/templates</loc>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user