Multiple language Vapor package

Hi all,

I am at early stage of the development of a Swift package using Fluent database and I am trying to think ahead what I should do to allow easy multiple language support.

In my db, a few tables have a String type id field that will obviously need to be translated in each supported language. Would it be correct to add one field for each language in the model itself (and then select the right field through a localized route), or is there another way to do the translation outside the db, using for example a String Catalog or something ?

Thanks for your advices.

See GitHub - vapor-community/Lingo-Vapor: Vapor provider for Lingo - the Swift localization library · GitHub for some inspiration

@0xTim I saw this already but I can't figure out where this JSON file is supposed to be :

and how to link it to the lingo.localize() command (I suppose it is going to be obvious). Is there going to be one JSON file per language ?

If I recall it correctly, it does look at your working directory.

Did you set up Lingo correctly? Did you specify the custom directory in Xcode (if you use Xcode)? What template engine will/do you use?

Yes, I think so.

@mattesmohr so many questions ! Ok I'll come back later when I am really at it. Thanks for now.