Title: Why hardcoded the error message
Last modified: August 18, 2022

---

# Why hardcoded the error message

 *  Resolved [szekitom](https://wordpress.org/support/users/szekitom/)
 * (@szekitom)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/why-hardcoded-the-error-message/)
 * Hi,
 * I am trying to translate the messages, but some messages are hardcoded in .php
   
   for example: UM()->form()->add_error( $key, sprintf( __( ‘**Your %s must contain
   less than %s characters**‘, ‘ultimate-member’ ), $array[‘label’], $array[‘max_chars’]));
 * Would it be possible to include this in the .pot language file?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [missveronica](https://wordpress.org/support/users/missveronicatv/)
 * (@missveronicatv)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/why-hardcoded-the-error-message/#post-15929167)
 * [@szekitom](https://wordpress.org/support/users/szekitom/)
 * UM Guide for translations:
 * [https://docs.ultimatemember.com/article/1449-how-to-translate-plugin](https://docs.ultimatemember.com/article/1449-how-to-translate-plugin)
 * These translations are handled by the “Loco Translate” plugin.
 * [https://wordpress.org/plugins/loco-translate/](https://wordpress.org/plugins/loco-translate/)
 *  Thread Starter [szekitom](https://wordpress.org/support/users/szekitom/)
 * (@szekitom)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/why-hardcoded-the-error-message/#post-15929184)
 * Tnx for the quick reply! I use “Poedit” and the translated files are uploaded
   to my site. [https://postimg.cc/7CGbgwQ0](https://postimg.cc/7CGbgwQ0)
    But this
   message is only half translated: [https://postimg.cc/Pvpk75YQ](https://postimg.cc/Pvpk75YQ)
 * What do I wrong?
 *  [missveronica](https://wordpress.org/support/users/missveronicatv/)
 * (@missveronicatv)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/why-hardcoded-the-error-message/#post-15929222)
 * [@szekitom](https://wordpress.org/support/users/szekitom/)
 * You should ask the “Poedit” support why translations are not working.
 * Download and use the “Loco Translate” plugin, where you can verify your translations
   online.
 *  Thread Starter [szekitom](https://wordpress.org/support/users/szekitom/)
 * (@szekitom)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/why-hardcoded-the-error-message/#post-15929299)
 * tnx, I found it in the Loco, and the translation works fine.
    -  This reply was modified 3 years, 9 months ago by [szekitom](https://wordpress.org/support/users/szekitom/).

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Why hardcoded the error message’ is closed to new replies.

 * ![](https://ps.w.org/ultimate-member/assets/icon-256x256.png?rev=3160947)
 * [Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin](https://wordpress.org/plugins/ultimate-member/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-member/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-member/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-member/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-member/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-member/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [szekitom](https://wordpress.org/support/users/szekitom/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/why-hardcoded-the-error-message/#post-15929299)
 * Status: resolved