Just the quick question - as user accounts do not have the option to have translated content, it was suggested in another thread that using different fields for each language, so for having a biography i am adding several fields to my account blueprint such as
biode:
bioen:
biofr:
while this is very clear i am somewhat can’t think about any way to call it in my template,
foreach($site->users() as $user) {
// obviously this does not work out of the box...
echo $user->bio$site->language()->code();
}
I have done quite alot of things with languages but i never had to change the actual fieldname dynamically. So i am somehow stuck in my head…
Edit:
Actually i found a solution, but i wonder if it’s a good one…
<?= $user->data()['bio'.$site->language()->code()] ?>