#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2009
    Posts
    3
    Rep Power
    0

    XSLT & languages


    Hi!
    I am trying to create a multilanguage application in XHTML.

    The mechanism works like this:
    source_neutral.xhtml:
    Code:
    <p>...</p><p translate="true">Yes</p>
    english.xml:
    Code:
    <lang id="Yes">Yes</lang>
    greek.xml:
    Code:
    <lang id="Yes">Ναι</lang>
    and then, output will be in english
    Code:
    <p>...</p><p>Yes</p>
    or greek
    Code:
    <p>...</p><p>Ναι</p>
    .I can do this with javascript.

    Can I do this with XSLT?
    Files are:
    xslt_transformator.xml
    source_neutral.xhtml
    english.xml
    greek.xml

    So the question is: How can I process an XML file (source_neutral.xhtml) with a XSLT (xslt_transformator.xml) with another file as data (english.xml)?
  2. #2
  3. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,054
    Rep Power
    9398
    Hold on. You're using JavaScript to do internationalization?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2009
    Posts
    3
    Rep Power
    0
    No I am not using anything yet. I am in planning mode.
    With Javascript I can get all tags with property translate="true" and replace nodes properly.
    But I am interesting in a better method.

IMN logo majestic logo threadwatch logo seochat tools logo