translate / amagama

Web service for implementing a large-scale translation memory
http://amagama.translatehouse.org
GNU General Public License v3.0
90 stars 27 forks source link

amagama-live.translatehouse.org API do not support LANG_COUNTRY form #3199

Closed darylounet closed 10 years ago

darylounet commented 10 years ago

From the documentation : http://amagama.readthedocs.org/en/latest/api.html

<SOURCE_LANGUAGE> and <TARGET_LANGUAGE> should be language codes in the form of LANG_COUNTRY where LANG is mandatory. LANG should be a language code from ISO 639 and COUNTRY a country code from ISO 3166. The following are valid examples: ar, de, en, en_GB, es_AR, fr, gl, hi, tlh,...

But it doesn't work. This URL returns 404 : https://amagama-live.translatehouse.org/api/v1/en_GB/fr/unit/Computer It works without _GB.

unho commented 10 years ago

The fact that amaGama supports languages using such naming doesn't imply that https://amagama-live.translatehouse.org provides such languages.

In other words, in a given amaGama instance if there is data for en_GB then you can query that language. If not, then you can't.

unho commented 10 years ago

If you look at the data returned in https://amagama-live.translatehouse.org/api/v1/languages/ you can easily see that en_GB is there, but only as target language. For example https://amagama-live.translatehouse.org/api/v1/en/en_GB/unit/Computer just works OK.