8 February 2010 at 2:28pm
I have installed the Image gallery module in a multilingual website with Arabic as the default. I created two albums in cms in Arabic names, and when I view them in front-end both album's names get the same url like : mysite.com/gallery/album/-
when I renamed albums to English, each album get it own url like: mysite.com/gallery/album/album1, mysite.com/gallery/album/album2 .. so it seems that Arabic characters are not recognized by the script, and instead they are replaced by a dush for both album names. I checked the tables collation and they are set to utf8..
anyone knows how to correct this?! I appreciate your help..
9 February 2010 at 1:55am
This is not an Image gallery module problem, the problem is how the CMS handles page title conversion to URL:s. If you're writing pages in a language that doesn't have English characters in it then you will have to give these pages an URL yourself on the Metadata tab.
9 February 2010 at 3:55am
@samukas, thank you for replying.. I created a page "gallery-page" and it has the Metadata tab option, whereas sublinks "albums" their links are generated by taking the album name as the url, and I can't see any Metadata option like the parent page!
@UncleCheese: that's exacly what we need, a custom url option like in parent pages. Now I have album names in arabic and link to the same page, I would appreciate if there is a fix for now..
9 February 2010 at 2:35pm
(Last edited: 9 February 2010 2:48pm),
ok, this is what I did to add a custom segment url to handle the roman character counterpart of the arabic title:
I added a database field and a textfield to managed it in the cms. The generateURLSegment() function now takes AlbumURL value instead of AlbumName value.
class ImageGalleryAlbum extends DataObject
static $db = array (
'AlbumName' => 'Varchar(255)',
'AlbumURL' => 'Varchar(255)', // added new database field 'Description' => 'Text'
public function getCMSFields_forPopup()
return new FieldSet(
new TextField('AlbumName', _t('ImageGalleryAlbum.ALBUMTITLE','Album Title')),
new TextField('AlbumURL', _t('ImageGalleryAlbum.ALBUMURL','Album URL')), // added new textfield
new TextareaField('Description', _t('ImageGalleryAlbum.DESCRIPTION','Description')),
new ImageField('CoverImage',_t('ImageGalleryAlbum.COVERIMAGE','Cover Image'))