~adnano/go-gemini#53: 
Add function to ResponseWriter to specify language

Thinking about gemini spec 5.2 --> What if there was a lang field in ResponseWriter and a SetLanguage function that took a RFC4646 language string?

Status
RESOLVED WONT_FIX
Submitter
~alexwennerberg
Assigned to
No-one
Submitted
3 years ago
Updated
3 years ago
Labels
No labels applied.

~adnano REPORTED WONT_FIX 3 years ago*

'lang' is just a parameter of the media type. You can use the mime package to easily specify the language:

mediatype := mime.FormatMediaType("text/gemini", map[string]string{
	"lang": "en-US",
})
w.SetMediaType(mediatype)

By the way, you can use the ~adnano/go-gemini-devel mailing list for general discussion like this.

~alexwennerberg 3 years ago

Ah, thanks. I'll use the mailing list in the future -- still getting used to what should go in the tracker vs mailing list on sr.ht

Register here or Log in to comment, or comment via email.