0 users online. Create an account or sign in to join them.Users


It was in my last case, as it wasn't technically a 'language', but yeah, it could use one of those extensions. I've not looked at them much.

@s_e how would I use {/path/to/current-language/@handle} ?

Without examples of your xml output, we can't really give specific advice. If you post your page's output, we can help a bit more.

how would I use {/path/to/current-language/@handle} ?

That's just an example. This doesn't actually exist out of the box. How to access the current language depends on what extension or workflow you use.

If you're using the other Multilingual extension, you could use the additional $root-ml-parameter which includes the language code.

Like this:

<a href="{$root-ml}/products/{product-name/@handle}">

This example would create the following HTML-ouput:

<a href="/en/products/my-cool-product-xy">

I'm trying to get the value of a url parameter, that is $url-language, which is available only when I call a http://mysite/en The parameter is missing when browsing the default language pages. This code

<xsl:if test="$url-language">  <!-- if the parameter exists -->

Returns url-language undeclared error on default language pages. Still I used the if statement many times to check for an existing node, in other contexts.

Any suggestion?....

In your master template, or on every page using the param, declare it as empty to overcome this.

<xsl:param name="url-language" />

This needs to be under the root of your template, where <xsl:output /> would sit.

This article has been of great help to me, thank you. I only missed a guide on how to set up a language navigation. I wrote a xml utility Language Switch.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details