-
Notifications
You must be signed in to change notification settings - Fork 3
Representing multiple languages #65
Comments
Looking at this a little bit more, if I browse to just about any Sector Category (leaving the sort in the top right-hand corner on A-Z) then Canadian activities are sorted to the top. This means that the first time most users encounter the bubbles for individual activities they are all in French. eg.s |
Ah, contrary to our conversation yesterday, looks like the double titles are being served depending on the result type: http://data.aidinfolabs.org/xquery/woapi.xq?ID=CA-1-A034782001&result=details (1 title, fr) @KitWallace - is it possible to get both title elements back in the details result? |
aidview now supports multiple title elements (commit to follow) - I'll leave this issue open though |
all titles returned in the details result |
I think we're nearly there. When I look at the first 20 results currently returned by the APi they are Canadian International Development Agency (CIDA) ones. Each of these has two title elements, the first in French the second in English. So, if I then look at these 20 in Aidview I still see 20 activities with titles in French http://aidview-dev.herokuapp.com/activities?SectorCategory=111 But, when I click through to each one's individual activity datasheet then the titles are in English, as per http://aidview-dev.herokuapp.com/activity/CA-1-A021431002 Is it possible that you've amended the code for individual data sheets but not for the Filtering subsets, Ben? I see similar behaviour when I filter by Country (well, for Canada anyway) http://aidview-dev.herokuapp.com/activities?Funder=CA and countries where CIDA are working, such as Afghanistan: |
Ah, these pages use the Looks like this gives the first title element : https://github.com/KitWallace/AIDVIEW-DB/blob/master/db/db/apps/iati/lib/api.xqm#L764 (I'm not totally sure). @KitWallace would it be possible to return the title elements in addition on this result? |
Currently values result is computed as |
Hi @KitWallace, Sorry for the delay in replying. If it was possible to replace for example: <!-- current -->
<iati-activity>
<code>CA-1-A021431002</code>
<name>Améliorer l'éducation de base aux enfants autochtones/ruraux-Sud des Andes et Amazonie, Pérou- Suivi</name>
<value>194137</value>
</iati-activity>
<!-- could we have: -->
<iati-activity>
<code>CA-1-A021431002</code>
<title xml:lang="fr">
Améliorer l'éducation de base aux enfants autochtones/ruraux-Sud des Andes et Amazonie, Pérou- Suivi
</title>
<title xml:lang="en">
Improving Basic Education for Indigenous/Rural Children in S. Andean and Amazonian Peru - Monitoring
</title>
<value>194137</value>
</iati-activity> |
OK done |
longer term it would be better to do this on the server because it not only the explicitly coded text which needs to be returned in in the native language, its the text value of codes as well. We don't have much in the way of language-specific code lists at the moment although this rewrite would regularize code names right now. So my preferred solution would be to add a language code to the API. |
An example here is the CIDA activity which is here in the API
http://data.aidinfolabs.org/xquery/woapi.xq?SectorCategory=112&Funder=CA&ID=CA-1-A034782001&search=&start-date=&end-date=&groupby=&start=1&pagesize=20&result=full&callback=&corpus=main&test=yes
with its datasheet in AidView here
http://aidview-dev.herokuapp.com/activity/CA-1-A034782001
As they are Canadian files they are being published in both French and English. There are a couple of questions I'd raise:
I know we dropped the support for multiple languages part of the Phase 2 development, but I think we agreed to default to English where multiple languages are used.
The text was updated successfully, but these errors were encountered: