-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basically the idea is to just fetch the things in all the languages by looping over the available locales. The results are stored into fields like `en_items` or `es_item`, so we can just fetch the right ones by checking the current locale. There's a bit of a mess in the model itself because the multi-languageness might happen at the single item level or at the collection level, depending on which query has been used. The check there is ugly, but restrucuring the collection to match the individual items is even uglier. The upshot is that we now pretty much get localized results for free in bridgetown; we don't need to do anything beside setting up the available locales like we'd have done anyway.
- Loading branch information
Showing
2 changed files
with
31 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters