Search

@guillem_l Thanks your interest :) Yes I can understand your pages approach, although my fear is that it will become too unwieldly to manage a separate site map for every language.. Also, it doesn’t make sense to have a different XSL template for every single static page.. the in-place multilingual editing that this plugin provides is really great and would like as much as possible to use it in my site!

Update

As a rudimentary hack, I have changed line 862 of field.multilingual.php from this:

OR t{$field_id}_{$this->_key}.value IN ('{$data}')

to the following:

OR t{$field_id}_{$this->_key}.`value-{$this->_current_language}` IN ('{$data}')

(The same goes for all the other mentions of .value in that function). I know this is quite likely to expose some other problems, so far it seems to produce the desired behaviour :)

Maybe there’s a way of changing the XML output to do something similar to the following:

<entry id="1">
  <title handle="a-title" en="a-title" fr="un-titre" de="ein-titel">A Title</title>
</entry>

Very simplified I know, but you can get the idea… Keeps the system handle then applies each language version, that way one could search via xPath for the correct handle language based on the URL param you are using for language specifics.

I don’t know how the content is stored for multilingual fields, hence the ‘just English’ version above, but you can get the gist of what I’m on about…

I’m sure there is a Delegate available for the XML generation where you can manipulate the XML before it is generated, if not, then shout Craig quickly as they are doing Delegate work at the moment for 2.2 here

I’ve had a break from Symphony a few days now, finishing other work. But I’m doing something in between guillem_l and jstar198. I’m building the page structure with pages (using the Page Prototypes extension to simplify template files needed), but using the Language Redirect extension for selecting content language. So my URL handles are only in english since you can’t have localized page handles.

So far I’ve found creating the site structure using pages makes the most sense, and gives me hierarchy and menu output almost for free. I’m not quite sure how best to get localized URLs with this, but it wouldn’t be a job for Multilingual Field in my case.

I do remember having a similar situation for some of my content as jstar198 does. I’ll let you know if I think of a good solution to it.

@designermonkey Sure that’s a possibility, although it would be pushing a lot more logic to the XSLT level; If I understand your solution, you would end up with the XML containing ALL the pages dumped together and then filtering the right one with XSLT… this is actually the problem I had before modifying the extension.

@froded Yes, using symphony pages to build the site structure does give you URLs and hierarchy, but as you say there’s no real way to get localised URLs - which is very important for me. Also it does seem somewhat counter-symphonian, having to define all those pages using exactly the same datasoure? I’ve ended up using a single symphony page for the whole site, and then having all my “site” pages as entries. It’s true that achieving hierarchy is not as easy this way, but it’s doable.

When I have some time (and am closer to a complete site) I will try post a summary of my solution. Thanks for all your input.

I look forward to reading your summary, I plan to do multilingual stuff in a forthcoming project, but really don’t know where to start…

@jstar198: I will be out next week but when comeback I will update the extension to include multilingual handles. I will use same method used for the values, one handle for each language and one default handle, this way we can use the appropiate handle for each language to filter the DS and use in the url.

@jstar198

If I understand your solution, you would end up with the XML containing ALL the pages dumped together and then filtering the right one with XSLT… this is actually the problem I had before modifying the extension.

Well, not exactly, One datasource for the list, one for the article, customised list datasource to not display if article one is not empty. it’s a good method for list/detail view…

It would rely on the url parameters of course.

I do all my list/detail views like this, obviously not multilingual (yet), but I really want to start providing more languages.

Most of the logic is taken care of by the datasource parameter filtering, prior to the XSLT filtering.

@designermonkey

I look forward to reading your summary, I plan to do multilingual stuff in a forthcoming project, but really don’t know where to start…

Have posted a first version at the link below, I know it’s a bit terse but that’s all I have time for atm. Hope it helps.

http://getsymphony.com/discuss/thread/50612/

Reddit ;)

I’m having trouble with the tinyMCE plugin not loading when I only got multilanguage fields (that is without any normal textareas) on the section.

The tinyMCE scripts are not included in the html header.

If I add a normal textarea with tinyMCE enabled, it does load however, and appears on both multilanguage fields and the normal textarea.

Can anyone confirm this, and is it a bug?

I can work around it for now by just having the extra field in the section, but that is not a suitable solution in the long run.

@Doctor: I will check it as soon as possible. Thanks to report it.

@guillem_l: Thanks. Looking forward to hearing your findings.

I’m testing out a lot of extensions, so it could be, I have messed something up, without knowing.

BTW. when I do get tinyMCE to load in a multilanguage field, the editor area is quite small on the secondary language. See attached screen-shots.

Attachments:
primary-language.jpg and secondary-language.jpg

@jstar198: Just published a new version of the field with multilingual handles to work with localized URL params as you prouposed.

@Doctor: Just published a new version compatible with tineMCE text formatter.

This version it is also compatible with Publish Filtering extension by Nick Dunn.

Multilingual Field updated to version 1.2 - beta on 20th of September 2010

@guillem_l

Thanks for the update, although didn’t work for me with a git pull. First I got an error about a missing } at line 683, then I was getting this MySQL error: http://pastie.org/1178723

@jstar198: Try to get now from git, and update re-enabling again the extension from the backend.

Seems to work fine now, thanks so much! :)

Starting to get used to working with git and github, mainly for helping out and sharing stuff with the Symphony community.

@guillem_l: I’ve added a small admin feature for this extension, and fixed a bug with the 1.2 upgrade if the language redirect setting contains spaces (eg. ‘no, en’). This has been sent as a pull request to you on github.

@froded: I just push the master branch with you pull request merged. Thanks for the improvements ;-)!

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • 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