This is more of PHP implementation detail. If you want a precise match you can do something like:
if ( isset( $words[$translated] ) )
return $words[$translated];
return $translated;
PS you might want to declare $words
as static, so that array is reused and not continuously re-created on each function call (which would be a lot of calls with gettext
hook).
Related Posts:
- How to remove Biography from user profile admin page
- Integrate WordPress and bbpress profiles?
- Remove Personal Options section from Profile
- Removing “Website” Field from the contact info
- How to disable profile.php for users?
- How to change profile picture in wordpress?
- Replace Gravatar with uploaded images?
- How to create a edit profile page for users?
- How do you make the email field on the profile page read only for subscribers?
- How do I remove the ‘Show Toolbar’ option?
- How to change the link “Edit my profile”?
- remove admin bar show hide option from profile settings
- displaying custom code on a given users profile page
- Make user profile field required
- How to Get User Profile Info on a Category Page
- Best way to change profile page
- The “Profile Picture” section just disappeared from my User Profile
- Fields in User Profile Page
- WP Use Profile Fields is missing
- user-edit.php profile options on TABS
- Using the filters in wordpress theme [closed]
- How display Last modified in profile wordpress [closed]
- Custom Profile Field for
- Add and Remove fields in Profile page
- Removing Fields From the Profile Page of Theme My Login Plugin
- Get WordPress author link by ID
- Add a link back to site on ‘edit profile’ page for users?
- What is the php function for “user’s public profile”
- Replace a specific profile field
- How to change name “Profile”
- Did something change in regards to custom profile fields in WP 4.8.2 (mine have disappeared)?
- Implementing profile page in wordpress
- How to remove unwanted section in profile page for only users?
- allowing user to add content, photos without giving access
- Does WP “out-of-the-box” allow user profile photos? [duplicate]
- Update user from external script
- Renaming profile sections
- Is possible to modify user_login after registration?
- get current user password on the profile edit page
- Edit profile fields with TML
- How to create a profile page for users?
- Remove Personal Options section only from subscribers profile
- Users system custom post type
- What is ‘\0’ in C++?
- Translation problem with timber and WPML (WordPress, different language per domain)
- How to create .pot files with POedit?
- Translate a plugin using .po .mo files
- HTML inside __() or _e() language translation string
- How to create a front end user profile with a friendly permalink
- When to use _e and __ for the translation?
- Change the text on the Publish button
- What is a Theme textdomain?
- How to make a WordPress plugin translation ready?
- Change language by clicking a button
- How to remove these fields from the ‘Profile’ section?
- How to get a buddypress user profile link and a certain user profile field for the current post author?
- Theme localization of “slugs” (custom post types, taxonomies)
- Override default WordPress core translation
- pass object/JSON to wp_localize_script
- Different Language for Frontend vs Backend
- Override parent theme translation on child theme
- Make display name unique
- Setting WPLANG from a plugin
- Open Source replacement for WPML? [closed]
- Disallow user from editing their own profile information
- How to get a translated string from a language other than the current one?
- How do you update user_email on the front end in WP 3.3?
- Is it ok to use a function to output the text domain name in a wordpress theme
- Custom strings for translation using Polylang plugin
- Translate widget titles using qTranslate plugin
- Is a text-domain necessary for a child theme
- How to print translation supported text with HTML URL
- How to get a localized version of WordPress from a repository?
- Localization: I want the backend: english and frontend in defined language
- Working with l10n contexts (_x etc)
- How-to: Translate plural forms for themes/plugins with PoEdit
- generating po mo translating files from scratch in a wordpress theme
- How can I manually upgrade translations?
- How to use tinyMCE for user “biographical info”?
- How to display a public profile page for registered users with custom slug?
- Do Child-Themes automatically load the Translation from the Parent-Theme?
- Filter translations (gettext strings) on specific admin pages
- How to integrate get_post_time with date_i18n function?
- [Plugin WPML] : How to create a translation of a post using the WPML API?
- Get basic Image Uploader on User Profile Page
- gettext does not translate when called in ajax
- How to debug failed load_theme_textdomain()?
- Which hook if user profile information is updated?
- How to obtain the user ID of the current profile being edited in WP-Admin?
- How to provide translations for a WordPress TinyMCE plugin?
- How to escape the single quote character in i18n translation strings?
- Is it safe to store a user setting you don’t want the user to ever modify as a user option?
- How do translated, escaped strings (esc_attr) in Themes work?
- How to hide admin account in BuddyPress? (for security reasons)
- Get a list of all available fields in the User Profile
- why is translation not working on theme?
- __(): What if I have to pass in a variable?
- Where the Nickname is being used in WordPress
- Changing the language of a single page
- Extra profile field as select box?