Page 2 of 2

Re: HTML in language strings

Posted: Wed Jan 07, 2009 9:46 pm
by alex.barylski
It's opinion I guess...

I personally separate the hell out of everything until it proves to time consuming to maintain, to me, that is part of the PCSpectra KISS principle. Keep everything minimal mandy until it's time consuming to do so, then:

1. Implement a tool to automate some of the process
2. Change techniques and merge the data/code with somethign else (ie: Language in HTML, Model and Controller, etc)

Cheers,
Alex

Re: HTML in language strings

Posted: Thu Jan 08, 2009 3:40 am
by webaddict
AlexC wrote:
Yes. What if you port to Windows desktop applications? HTML tags won't likely render.
That's kind of a weird argument/point, if there are a few language strings with HTML in it currently, then surely I am already using vast amounts of HTML (as it is a web application) - so why would it ever be ported to that :D
Right. I agree on the fact that it is weird to be worried you'll have to port it to Windows desktop applications. Nevertheless, I agree with the notion of separation, though I can see the problems you're having. I think it all boils down to a question: are you going to use language string to display in other things than just HTML? I'd imagine those strings could also be used in rendering a PDF file, which is not as uncommon as porting it to a Windows application.

If you're 100% absolutely sure that it won't be used for anything else (what you usually can't say), I'd say you prolly don't want to make it harder on yourself. If you're not sure, don't use HTML in translations.

Re: HTML in language strings

Posted: Thu Jan 08, 2009 3:45 am
by alex.barylski
I'd imagine those strings could also be used in rendering a PDF file, which is not as uncommon as porting it to a Windows application.
PDF would have been a better example... :P

As a long time Windows developer I always draw on that example case, to determine whether something makes sense or not in layer X, Y or Z.

The core idea is the same...the client changes from thin to thinner to thick or whatever. If you were to shown those message in a CLI version, HTML wouldn't apply, etc.