News for hackers. Stuff that matters.
Re:Fluent – A localization system for natural-sounding trans... by rhyme-boss on Sunday June 11, 2023 @09:33AM (#36281205)
I kind of despise the pattern where in order to support translations you have to turn every string in your program into an abomination of bespoke markup, storing strings in variables, etc..
Re:Fluent – A localization system for natural-sounding trans... by winternewt on Sunday June 11, 2023 @11:50AM (#36282501)
Do you have any alternative in mind? Assuming we want the user interface to have grammatically correct language.
Re:Fluent – A localization system for natural-sounding trans... by rhyme-boss on Wednesday June 14, 2023 @09:15AM (#36325421)
use a delimiter that's already in your markup to identify strings, and then translate those. Like look at `<p>` boundaries and other tags that wrap plain text, and attach an attribute like data-translation-id.