Localization for HTML pages RRS feed

  • Question

  • User2026493776 posted


    Are there any way to make working together html pages and localization?

    Wednesday, August 5, 2009 8:05 AM

All replies

  • User-1854199953 posted

     nope because html is 'static' not 'dynamic' like asp, php, asp.net.

    The 'dynamic' languages actually generate the html that is sent to the browser (together with translations where implemented) where as .htm files are static as in there is no server generated data.

    If you want to support localization you will need to move to either asp, asp.net or php (there are others available but these are the three main ones) that supports scripting.

    Wednesday, August 5, 2009 8:21 AM
  • User2026493776 posted

     I know that html is static. I'm interesting in ways of html localization. With javascipt for example. Are there another ways? Or maybe there are some js framework for localizing html pages.

    Wednesday, August 5, 2009 8:32 AM
  • User-1854199953 posted

    To do what you want with javascript, you would have to parse the document and replace the innerHtml of each element on the page with values from say an xml document.  I do not doubt that you could do this but because javascript is different on every browser out there, you would have to have quite a substantial amount of code.

    Worth asking yourself would it be quicker and easier to copy your site and just manually change the text on the page thereby having a site for each language?  Would this option be better for the nature of your website?  Also if you do everything in Javascript, what if they have it disabled?

    Sunday, August 9, 2009 4:15 PM