Add spanish as an example

Adding a new language without nlp requires now only to fill out the
pieces:

- define a list of month names to support date recognition
- add it to joex' dockerfile to be available for tesseract
- update the solr migration/field definitions
- update the elm file so it shows up on the client
This commit is contained in:
Eike Kettner
2021-01-17 12:18:23 +01:00
parent 360cad3304
commit 26dff18ae0
8 changed files with 49 additions and 2 deletions

View File

@ -12,6 +12,7 @@ type Language
| English
| French
| Italian
| Spanish
fromString : String -> Maybe Language
@ -27,6 +28,10 @@ fromString str =
else if str == "ita" || str == "it" || str == "italian" then
Just Italian
else if str == "spa" || str == "es" || str == "spanish" then
Just Spanish
else
Nothing
@ -46,6 +51,9 @@ toIso3 lang =
Italian ->
"ita"
Spanish ->
"spa"
toName : Language -> String
toName lang =
@ -62,7 +70,10 @@ toName lang =
Italian ->
"Italian"
Spanish ->
"Spanish"
all : List Language
all =
[ German, English, French, Italian ]
[ German, English, French, Italian, Spanish ]