[opencms-dev] Multilingual NavText

Christoph Fröhlich cfauto at folge2.de
Fri Oct 14 13:39:53 CEST 2011


It is possible to define which properties shall be editable for each page in the sitemap editor.

"Navigation Text" for example is already one of these properties.

Maybe its an option for you to implement the property-per-language approach and configure the sitemap to make these properties editable. Then your users can change the navigation text for all languages when creating the pages.

Regards
christoph


Am 14.10.2011 um 13:19 schrieb Thomas Göttlich:

> Hi Paul,
> 
> well, structured content can contain multiple languages so I'd say that also an intended possibility in OpenCMS. It's just the navigation that doesn't support that.
> 
> We also have parts of our site that define the navigation inside the xml content. That, however, makes it harder to view the navigation in the workplace explorer, since you'd then have to open the resource file. Ok, editing navigation in the workplace explorer is still suboptimal - you can't see the navpos for example - but it's still a start and AFAIK you don't have the new sitemap editor in the workplace, do you?
> 
> I'll think about the property-per-language approach, but that has the disadvantage that standard edit options like "edit navigation" wouldn't support that.
> 
> Regards,
> 
> Thomas
> 
> 2011/10/14 Paul-Inge Flakstad <flakstad at npolar.no>
> Hi Thomas,
> 
>  
> 
> First of all, I don’t think you’re asking a commonly asked question. The “default” way to handle multiple languages in OpenCms is by employing siblings. Since you’re avoiding this (I don’t get why, it’s a pretty neat solution), you’re also straying from the way OpenCms was intended to work. With this in mind, I wouldn’t expect to find a quick fix anywhere. You’re at a point where you’ll have to create a custom implementation.
> 
>  
> 
> While your proposed solutions would work, they do raise the bar for the editors, and errors are likely to occur.
> 
>  
> 
> A couple of other suggestions:
> 
> 1.       Define one navtext property for each language. (Basically the same as using the default property, but this way you’ll free the editors from the syntax requirement.)
> 
> 2.       Make your own navigation system – structured content works well for this. (I would go for this. It is like your properties file alternative, but easier to maintain. I have successfully implemented such a system on my sites, because I wanted a navigation that was independent from the folder structure. It works like a charm. :)
> 
>  
> 
> HTH.
> 
>  
> 
> Best regards,
> 
> Paul
> 
>  
> 
> From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Thomas Göttlich
> Sent: 14. oktober 2011 11:30
> To: The OpenCms mailing list
> Subject: [opencms-dev] Multilingual NavText
> 
>  
> 
> Hi,
> 
> I know this is a commonly asked question but since I couldn't find anything helpful in the wiki or using google yet, I'll ask my question here:
> 
> How can I maintain a folder's navtext property in a multilingual way?
> 
> We currently have a site that consists of one tree and structured content containing mutliple languages.
> Our templates use a fallback mechanism to retrieve content in the default language (English) if there's no content for the requested language (e.g. German).
> This works on a per-field basis, i.e. you could, for example, set some images in the default language only and just translate the text in the other supported languages.
> 
> Because of this, and since it is a much cleaner approach IMHO, we don't want to fiddle around with different structures in multiple languages (i.e. no siblings!).
> 
> All worked fine so far, since we didn't use the OpenCMS navigation facilities yet.
> 
> However, now we need to employ them and thus there's the problem of how to translate the navtext property.
> 
> Right now I could think of two ways, both of which don't fully satisfy me:
> 
> 1. Store a key in the navtext and in the template access a properties file. That would require the user to maintain an additional file and keep it in sync with the keys.
> 
> 2. Directly store the translations in the navtext, i.e. like this: "en=Some Folder,de=Irgendein Ordner,nl=Een map,es=Cualquier directorio,zh=某一个文件夹" etc.
> Then I'd have to split the navtext in the template and extract the correct language. The problem with this is that it's quite fragile since the user would need to enter the translations in the correct format, i.e. <language code>=<translation>,<language code>=<translation>, ... . This might be error prone.
> 
> Any more ideas?
> 
> Thanks in advance,
> 
> Thomas
> 
> 
> 
> 
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
> 
> 
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20111014/2b6709be/attachment.htm>


More information about the opencms-dev mailing list