Hello, I have a mulitlingual site and was wondering how to import multilingual geographical taxonomies. any ideas?

CommentFileSizeAuthor
#4 taxocsv(1).xls36 bytesshruti1803
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

manarak created an issue. See original summary.

dman’s picture

Tricky.
For the RDF taxonomies, the input labels can be supplied with multiple lang attributes, and if there are multiples, we opt for the site default by preference.
But honestly, I've not worked with translations on taxonomies at all In D7, so there is no special structure inside the system to support that explicitly.
Pretty much *ALL* the taxa I've had access to in the wild have been single language only, and all the supplied data (CSV etc) I've encountered had single labels, occasionally with synonyms. I support the idea, but have never had a real-world case where this question applies yet.

Where are you sourcing the multi-language inputs from?

DrupalDope’s picture

what I really mean is of course localized taxonomies, so that "New Orleans" will be shown as "La Nouvelle Orléans" in French.

I already have websites using multilingual fields, including country/province/region/city structures, so I can use these as sources.

For people who don't yet have their own translations, many of these translations can be sourced from phone and postal companies, along with postal codes, for example in Switzerland which has 4 official languages plus English as an unofficial fifth.

In many other instances, especially incase of countries with non-latin languages requiring transliteration into English, English will be the localized version, for example in Russia, Thailand, etc.

If the taxonomy remains at a reasonably high level (i.e. not going down until the village level), online translation services such as Google translate will yield good results for provinces, larger cities and regions.

I'm currently building a site for Thailand, so I thought: gosh - why can't I import a multilingual taxonomy structure?

Are there existing taxonomies to download for drupal? Such as geography, car makes, computer components, restaurant cuisine and dish genres, plants, animals, jobs/occupations, etc. ?

shruti1803’s picture

Status: Active » Needs review
FileSize
36 bytes

Hi manarak,

You can install Taxonomy CSV import/export module(https://www.drupal.org/project/taxonomy_csv). Then go to configuration page(admin/structure/taxonomy/csv_import). Click on first tab "1. What do you want to import", Choose "Translation" mode and set "List of languages" which you want(eg: en, hi). Click on forth tab "4. Which vocabulary do you want to import into?", here choose the vocabulary you want import in "Vocabulary choice". Then comes to second tab "2. Where are items to import?", here choose the option "In a local file" and upload the csv file(Find below attachment of the format of csv file that i have imported).
Format of Csv file: term name(Column1), translated term name(Column2), term description(Column3), translated term description(Column4).
When you will go to view page of taxonomy term and switch the language, you will find the translated term.

dman’s picture

I understand the use and purpose of translated vocabularies. I think that would be great to support - if there were any open-data sources using a published standard that we could run it against!

In the project page I link to the notes about the data formats for taxonomy sharing (existing standards) that I have encountered and try to support.
Of these, only the RDF one (Possibly TCS also) has a chance of serializing language translations. The CSVs and native XML ones cannot be extended with that capacity.

I have collected a few data sources for redistribution before, and had plans to grow that idea. Here, for example is a list of Regions and suburbs of New Zealand Distributed as CSV for importing into D6.

The module comes with plugin support for direct import from remote data sources as well - when suitable data sources can be found. Both flat-file and transactional lookup service were supported.
One of those sources was the (now defunct) "Freebase" project - from where I could successfully import controlled vocabularies of many many topics: Music Genres, Geographical subdivisions, Occupations, Types of car, etc etc. Unfortunately, Freebase went away a year or more ago.
Wikidata is working towards providing a similar service, but it's nowhere near as fun as Freebase was.
Here is the beginnings of an example Query that could be used to populate a taxonomy of Thai placenames, and translations

The idea would be that we could query that metabase directly for JSON, and set up our Drupal Taxonomies just by asking for these lists.

That doesn't happen, because I've not dug into the wikidata service at all yet, and sunk way too much time into trying to talk to Freebase instead.

DrupalDope’s picture

hmm... hmmmmm... hmm... *scratches head*

thanks shruti for the process and dman for your thoughts - pity about freebase!