Jump to content



Photo
html5 css3 xml

  • Please log in to reply
17 replies to this topic

#16 OP Class

Class

    Neowinian

  • Joined: 01-August 05
  • Location: Hungary

Posted 18 July 2013 - 13:27

Server side isn't possible in his case (I wonder how he was able to find hosting which is so bad that they don't support php or asp atleast xD).

@primexx isn't using external xml files for each language it actually making worse? since you're doing additional http request :p

 

 

Easiest would be just a index php with language detect from ip and then load the correct php file with "include", I'd just get a better hosting to be honest :/

 

It's really cheap! Do don't consider it as a webhost, more like I pay only for the domain and they provide a flat-easy only HTML webhosting for that. It's costs 20EUR for 3 years, aprox less then 30$. So for this price? Will you get a domain name + proper webhosting? Doubt it...or?!

 

Actually, previously I had website where I made my language change with a simple PHP, without knowing PHP even. Anyway, now I have this host, what can I do? I don't want to spend more on then it's actually worth. HTML5 is nice nowadays and in most chases should be enought. 

 

i'm not sure you *have* to use javascript. I played with XML and XSLT a long time ago, which is very powerful once you figure out the basics of how it works. You can just make multiple XML files each with a different language which contains all the words on the page (using custom structure/tags, since XML uses arbitrary tags), in each XML reference an XSLT stylesheet, which you can use to render it to html, and in the XSLT make reference to a CSS file to style the HTML that just got derived from your XML file. That way you can just have links to each XML file for the different languages, but still only have one-ish place to edit to change the style.

 

obviously, just as hacky as the aforementioned suggestions, the best is still to do it server-side, so much easier.

 

OK. Might dig in a bit into that...althou I started to structure it with the above suggestions.

 

well all these workarounds suck. I agree a better host is best.

 

True.




#17 primexx

primexx

    Neowinian Senior

  • Tech Issues Solved: 6
  • Joined: 24-April 05

Posted 18 July 2013 - 13:44

You can get a proper hosting account for <$25 a year for that kind of low usage.



#18 The_Decryptor

The_Decryptor

    STEAL THE DECLARATION OF INDEPENDENCE

  • Tech Issues Solved: 4
  • Joined: 28-September 02
  • Location: Sol System
  • OS: iSymbian 9.2 SP24.8 Mars Bar

Posted 19 July 2013 - 11:40

...
Actually, previously I had website where I made my language change with a simple PHP, without knowing PHP even. Anyway, now I have this host, what can I do? I don't want to spend more on then it's actually worth. HTML5 is nice nowadays and in most chases should be enought. 
...


Just because you can do something on the client, doesn't mean you should (And building the site template is something that should definitely be done on the server)

Yes, you can do a full multi-lingual site with pure HTML/JS, but you don't want to because it creates a bad experience for the user specifically.