helpers: Improve the language prefix logic
helpers: Improve the language prefix logic

See #2444

tubo028/hugo,fedelibre/hugo,jygastaud/hugo,bogem/hugo,mdhender/hugo,mitchchn/hugo,bogem/hugo,fedelibre/hugo,mdhender/hugo,mdhender/hugo,gohugoio/hugo,gohugoio/hugo,tubo028/hugo,mayah/hugo,fedelibre/hugo,fedelibre/hugo,mdhender/hugo,mitchchn/hugo,Zenithar/hugo,anthonyfok/hugo,Zenithar/hugo,anthonyfok/hugo,digitalcraftsman/hugo,MarkDBlackwell/hugo,mayah/hugo,jygastaud/hugo,gohugoio/hugo,MarkDBlackwell/hugo,digitalcraftsman/hugo,anthonyfok/hugo