# Language - variable user fieldselection

**URL:** <https://forum.getkirby.com/t/language-variable-user-fieldselection/7708>\
**Category:** Questions\
**Tags:** v2\
**Created:** [June 12, 2017, 4:13pm UTC](https://forum.getkirby.com/t/language-variable-user-fieldselection/7708 "2017-06-12T16:13:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![carstengrimm](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/carstengrimm/32/188_2.png) [@carstengrimm](https://forum.getkirby.com/u/carstengrimm)\
**Post date:** [June 12, 2017, 4:13pm UTC](https://forum.getkirby.com/t/language-variable-user-fieldselection/7708/1 "2017-06-12T16:13:07Z")

</div>

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,

```auto
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…

```auto
<?= $user->data()['bio'.$site->language()->code()] ?>

```

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [June 12, 2017, 4:24pm UTC](https://forum.getkirby.com/t/language-variable-user-fieldselection/7708/2 "2017-06-12T16:24:55Z")

</div>

```auto
<?php
$lCode = $site->language()->code();
$bio = "bio" . $lCode;
foreach($site->users() as $user) {

echo $user->$bio(); 
}

```

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 4:49pm UTC](https://forum.getkirby.com/t/language-variable-user-fieldselection/7708/3 "2025-02-06T16:49:50Z")

</div>

Archived on February 6, 2025, 4:49pm UTC


