Customize login field naming

Hi All,

Does anyone know in which file I should look to change the naming of the ‘Username or Email Address’ field on the login page?

I am using only LDAP logins with only a username as a possible login.
It is quite confusing for the users because they often try to use their email address for logging in which ofcourse fails.

thanks in advance

Hello, the translated strings are located in …/core/l10n/
Open the related language files with the extension *.js and *.json and do your modifications.

If your setup is english, then you have to modify the placeholder string in …/core/templates/login.php


thanks tuxedo! worked flawlessly. :sunglasses:

Awesome, simple and just what I was looking for. Thanks :slight_smile:

This worked great with all my version16, but it seems to be missing in my version 17 login.php file?
Here is my whole login.php file:

<?php /** @var $l \OCP\IL10N */ ?> <?php script('core', 'dist/login'); ?>
<?php if (!empty($_['alt_login'])) { ?> <?php }

Hello, the english placeholder strings moved to file:

I modified only login.js and this seems to work.

1 Like


I made the modifications for pt_BR language in “core/l10n/”, but didn’t work… =/
I restarted apache and also the server, but the naming didn’t change.

I’m on version 18.0.2.
Someone have an idea about this?


The browser’s cache was trolling me. :upside_down_face:


I’m attempting to do the same thing, but not sure how to modify the login.php file.
I modified the strings in en_GB.js and en_GB.json FROM “Username or email address” to “Windows Username”.

Where in login.php do I make the corresponding changes?