# How to customize user name display?

**URL:** <https://forum.xwiki.org/t/how-to-customize-user-name-display/3492>\
**Category:** Help / Discuss\
**Created:** [August 23, 2018, 3:22pm UTC](https://forum.xwiki.org/t/how-to-customize-user-name-display/3492 "2018-08-23T15:22:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jiahongchao](https://forum.xwiki.org/letter_avatar_proxy/v4/letter/j/f0a364/32.png) [@jiahongchao](https://forum.xwiki.org/u/jiahongchao)\
**Post date:** [August 23, 2018, 3:22pm UTC](https://forum.xwiki.org/t/how-to-customize-user-name-display/3492/1 "2018-08-23T15:22:16Z")

</div>

It always display user name in “[first name] [last name]” form, however, Chinese usually need “[last name][first name]” form,how to change it?

---

<div class="post-metadata">

**Author:** ![vmassol](https://forum.xwiki.org/user_avatar/forum.xwiki.org/vmassol/32/6_2.png) [@vmassol](https://forum.xwiki.org/u/vmassol)\
**Post date:** [June 18, 2024, 3:12pm UTC](https://forum.xwiki.org/t/how-to-customize-user-name-display/3492/2 "2024-06-18T15:12:32Z")

</div>

Good point. This is a current limitation.

You should create a jira issue at [XWiki Platform - XWiki.org JIRA](https://jira.xwiki.org/projects/XWIKI/summary)

The only solution right now would be to patch the code at [xwiki-platform/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java at d5eef693bd3f4b50bf440dd090bf404f3b772a59 · xwiki/xwiki-platform · GitHub](https://github.com/xwiki/xwiki-platform/blob/d5eef693bd3f4b50bf440dd090bf404f3b772a59/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java#L6315-L6323)

---

<div class="post-metadata">

**Author:** ![vmassol](https://forum.xwiki.org/user_avatar/forum.xwiki.org/vmassol/32/6_2.png) [@vmassol](https://forum.xwiki.org/u/vmassol)\
**Post date:** [June 19, 2024, 12:03pm UTC](https://forum.xwiki.org/t/how-to-customize-user-name-display/3492/3 "2024-06-19T12:03:03Z")

</div>

> [@vmassol](#):
>
> You should create a jira issue at [XWiki Platform - XWiki.org JIRA](https://jira.xwiki.org/projects/XWIKI/summary)

I’ve created the jira at [Loading...](https://jira.xwiki.org/browse/XWIKI-22277)

---

<div class="post-metadata">

**Author:** ![Jan-Paul-Kleijn](https://forum.xwiki.org/user_avatar/forum.xwiki.org/jan-paul-kleijn/32/7060_2.png) [@Jan-Paul-Kleijn](https://forum.xwiki.org/u/Jan-Paul-Kleijn)\
**Post date:** [June 22, 2024, 10:44am UTC](https://forum.xwiki.org/t/how-to-customize-user-name-display/3492/4 "2024-06-22T10:44:08Z")

</div>

Until the Jira issue is picked up and implemented in XWiki, perhaps I can provide our Chinese friends with a temporary solution. This is a CSS based solution depending on switching the label contents of the first name and the last name in the user profile and registration page. It is a bit hacky but it should do the trick.

This piece of CSS can be placed in the advanced section of the theme of your wiki. Route:  
`Global admin > Look & Feel > Themes > Color theme (customize) > Advanced`

```auto
html[lang="zh"] { /* Change here for defining LanguageCode_RegionCode (e.g. zh, zh_CN, zh_TW, zh_SG or zh_HK) */
  #profilePane label[for$="first_name"]::before,
  #register label[for$="first_name"]::before {
    content: "姓"; /* Change here for defining the LAST NAME */
  }
  #profilePane label[for$="last_name"]::before,
  #register label[for$="last_name"]::before {
    content: "名"; /* Change here for defining the FIRST NAME */
  }
}

/* Leave CSS below as is (no changes needed). */
html[lang^="zh"] {
  #profilePane label[for$="first_name"]::before,
  #register label[for$="first_name"]::before,
  #profilePane label[for$="last_name"]::before,
  #register label[for$="last_name"]::before {
    position: absolute;
    left: 0;
    visibility: visible;
  }
  #profilePane label[for$="first_name"],
  #register label[for$="first_name"],
  #profilePane label[for$="last_name"],
  #register label[for$="last_name"] {
    position: relative;
    visibility: hidden;
  }
}

```
