mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 18:38:26 +00:00
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:
@ -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 ]
|
||||
|
Reference in New Issue
Block a user