activist
activist copied to clipboard
Create text access functionality for organizations, groups and events
Terms
- [x] I have searched open and closed feature requests
- [x] I agree to follow activist's Code of Conduct
Description
As of #1635 we're accessing all texts in the platform via [0] to get the first text entry (we want to allow entities to eventually localize their texts). We should create a method to access these texts in the stores and remove the instances of [0] from the text access methods. This functionality should check what the locale the user currently is in is and then try to access the corresponding iso. If the ISO does not exist, then we should default to the "default" text value.
[!NOTE] There's going to be a new issue after this to switch "primary" to "default" in the text tables. This issue will be blocked by it.
Contribution
Happy to discuss how best to implement this and support on implementation/review 😊
CC @nicki182 for the discussion here and also the issue I'm making after on text database changes :)
I think this should be based from the user selection when it selects the language of the website we can put language and based on that check if there is a text with that language or it not default to English
But then some organizations won't have English texts and then we wouldn't have a fallback if the user is say on Spanish and the organization has French as the language they have texts for. Don't we need a defined fallback method?
I think we should make obligatory to have the texts in English, then add for different languages
That would be the fallback method, check if they have Spanish, if they don't then English