mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
@@ -470,16 +470,11 @@ func (s *Site) IsMultiLingual() bool {
|
||||
}
|
||||
|
||||
func (s *Site) LanguagePrefix() string {
|
||||
conf := s.s.Conf
|
||||
if !conf.IsMultiLingual() {
|
||||
prefix := s.GetLanguagePrefix()
|
||||
if prefix == "" {
|
||||
return ""
|
||||
}
|
||||
|
||||
if !conf.DefaultContentLanguageInSubdir() && s.language.Lang == conf.DefaultContentLanguage() {
|
||||
return ""
|
||||
}
|
||||
|
||||
return "/" + s.language.Lang
|
||||
return "/" + prefix
|
||||
}
|
||||
|
||||
// Returns the identity of this site.
|
||||
|
Reference in New Issue
Block a user