Open EwaSniegowskaPCSS opened 2 years ago
I thought that maybe analysing/altering the content of "configuration_settings" table might be helpful, but it's empty for an application with default labels (en/de).
Hi @EwaSniegowskaPCSS, thanks for your interest in iQvoc.
You do not need to put your language configuration into an initializer. You can change configuration during runtime at /en/config.html
After saving you're able to add labels in configured languages:
Put this into an initializers (e.g. config/initializers/iqvoc.rb
)
Iqvoc.config do |config|
config.register_settings({
'available_languages' => ['pl', 'en', 'uk'],
'languages.pref_labeling' => ['pl', 'en', 'uk'],
'languages.notes' => ['pl', 'en', 'uk']
})
end
Please make sure that you provide a localisation file if you set a custom language (see config/locales/ for supported languages)
Thank you very much for the answer, unfortunately I could only test it now. Everything works as expected.
I also added the fragment:
'languages.further_labelings.Labeling::SKOS::AltLabel' => ['fr'],
to configure Alternative labels
.
I have a question regarding an option Secondary
in the Language
menu.
I read about it in the release notes:
It's also possible to translate secondary concept relations by switching the secondary language.
But I don't fully understand it. Would it be possible for you to provide a screenshot that illustrates this feature?
Hi, I'm trying to configure iQvoc to use other than predefined languages.
I tried to alter the code. I put:
at the end of
config/initializers/iqvoc.rb
file.I try to run application then but I get an error during
bundle exec rake db:migrate
Without my code alterations the migration is successful. I'm not sure where should I put this configuration code.
If the language configuration is indeed stored in a table, maybe I could alter it using
db/seeds.rb
file? This would be easier for me as I expect different deployments of the application with different language preferences and it would be nice not to have to build a separate docker image for each of them, just override theseeds
file before migration.