[ckan-discuss] Looking for bilingual implementations of CKAN

Sean Hammond sean.hammond at okfn.org
Sat Dec 22 13:52:43 GMT 2012


> >> For Tags my plan is to make them all "English text - French text" and
> >> then show the correct text for the user with some template magic.
> >
> > The multilingual extension handles tags
> 
> You mean it looks them up in the term_translation_table before
> displaying them, right?
> 
> I was hoping to keep the translations together with the originals
> instead of in a separate table that might be harder to keep up to
> date.

Well you could have tags and tags_fr fields on datasets and then with
some fancy javascript work, you could probably put together an interface
where users can add and remove a variable number of arbitrary tags when
adding or updating a dataset, and can enter the translation of each tag
next to the tag itself, then when they submit the form it ends up stored
as tags and tags_fr in the dataset. But this would be non-trivial
development work, both in terms of the code and the user-interface
design.

The other problem with storing both tags and translations of the tags
together in the dataset itself, is that different datasets will have the
same tags and you'll have to re-enter the translation of the tag each time
you re-use it on a new dataset, and different datasets might end up with
different translations of the same tags.

With fields like title, description, etc. you don't have this problem
because you don't expect two datasets to have exactly the same title for
example, so it's fine to store the original and the translation in two
different fields in the dataset itself.

But for tags, it probably makes a lot more sense to use the multilingual
extension.

One problem with this is adding the translations for the tags, currently
the multilingual extension only lets you do this over the API.  Of
course you could add a web interface for listing all the tags in the
system and adding/editing their translations, could be implemented as a
CKAN extension probably, and could probably even be integrated into the
dataset create/update form, but this would also be non-trivial
development work.



More information about the ckan-discuss mailing list