Answer the question
In order to leave comments, you need to log in
How to implement localization of Rails + Sequel models?
Hello, I need to implement the localization of data models so that they do not generate additional queries to the database (PostgresSql). Using set_dataset does not lead to anything good. I lose the ability to save data. Since Sequel throws an error:
Sequel::DatabaseError: PG::SyntaxError: ERROR: syntax error at or near ","
LINE 1: INSERT INTO "user_roles", "loc_user_roles" ("name_key", "tes...
Answer the question
In order to leave comments, you need to log in
If I understand correctly, then the easiest way to localize a model is to add a field with a locale to the model. And already, depending on the locale of the environment, make a regular query in the database, and show what corresponds to the locale.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question