Title: Bug: Registering Empty Strings
Last modified: August 24, 2016

---

# Bug: Registering Empty Strings

 *  Resolved [PaulC53](https://wordpress.org/support/users/paulc53/)
 * (@paulc53)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/bug-registering-empty-strings/)
 * I spent a great deal of time trying to debug an issue where a number of strings
   that I had registered were not appearing on the “Strings translation” page.
 * I was retrieving a number of strings using get_option() to pass to pll_register_string().
   Some of these did not yet have values, so, when get_option() returned FALSE, 
   I passed an empty string (i.e. ”) to pll_register_string(). Since I had given
   the required parameters and no error was thrown, I assumed that the issue laid
   outside of the plugin.
 * However, that was not the case. The strings would not appear on the “Strings 
   translation” page until they had a non-empty value, despite having been registered
   with a name.
 * This was a very frustrating bug to identify. May I recommend either allowing 
   an empty string or updating the documentation to state that a non-empty string
   is required?
 * Otherwise, I’m really liking this plugin. Keep up the great work!
 * -Paul
 * [https://wordpress.org/plugins/polylang/](https://wordpress.org/plugins/polylang/)

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

 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/bug-registering-empty-strings/#post-6002065)
 * Hi!
 * You can register empty strings. But Polylang does not display them in the list
   table because in my opinion, it does not make sense to translate them.
 *  Thread Starter [PaulC53](https://wordpress.org/support/users/paulc53/)
 * (@paulc53)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/bug-registering-empty-strings/#post-6002066)
 * Hi Chouby,
 * The functionality makes sense, but if I register a string and then the name doesn’t
   appear on the registered strings table and there’s no reason given for it, there’s
   a gap.
 * The registered strings in question are user-set strings, so not all them had 
   string values to translate when I registered them, as filling in those strings
   was the next step. However, when they didn’t appear on the table at all, it appeared
   that they were not registered at all, when, in fact, they were.
 * It would make sense to either provide the names of the registered, empty strings
   on the string translation page so that the user knows that the names were indeed
   registered, or make it clear in the documentation that they won’t appear if the
   string value is empty.
 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/bug-registering-empty-strings/#post-6002068)
 * > It would make sense to either provide the names of the registered, empty strings
   > on the string translation page so that the user knows that the names were indeed
   > registered
 * I prefer not to pollute the list table with empty strings.
 * > or make it clear in the documentation that they won’t appear if the string 
   > value is empty
 * I will
 *  Thread Starter [PaulC53](https://wordpress.org/support/users/paulc53/)
 * (@paulc53)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/bug-registering-empty-strings/#post-6002069)
 * Thanks again for the awesome plugin!

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

The topic ‘Bug: Registering Empty Strings’ is closed to new replies.

 * ![](https://ps.w.org/polylang/assets/icon-256x256.png?rev=3433336)
 * [Polylang](https://wordpress.org/plugins/polylang/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/polylang/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/polylang/)
 * [Active Topics](https://wordpress.org/support/plugin/polylang/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/polylang/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/polylang/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [PaulC53](https://wordpress.org/support/users/paulc53/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/bug-registering-empty-strings/#post-6002069)
 * Status: resolved