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
- Localization: I want the backend: english and frontend in defined language
- How to use tinyMCE for user “biographical info”?
- Where the Nickname is being used in WordPress
- Remove WordPress Toolbar buttons
- How to change admin bar color scheme in MP6 / WP 3.8 front end?
- What is the purpose of an extra file for translation?
- Can’t we use strings defined as PHP constants if we want to translate them in a plugin?
- get_the_date() for translating date format
- How to use Yoast SEO backend in english even if WPLANG variable is not english?
- Suggestions for i18n plugin [closed]
- Custom translation of Month names
- How do I translate this string – PHP syntax question
- Make changes to translation?
- Author must complete profile info before they can publish a post?
- Adding another arg to comments_popup_link
- List User Comments on User Profile BuddyPress [closed]
- Is is safe to edit language files from wp-content/languages/plugins/woocommerce-ro_RO?
- WPML Translated Term
- How to add local users to wordpress without email password?
- Theme localization in WPML – .mo file error [closed]
- How to use the Display Name as the post title in a custom post type?
- Internationalization autocomplete JS variable
- Transliterating search term in another language
- Different translations for the same plugin inside a multisite
- How to add a user profile page to frontend?
- How to merge two .PO language files?
- Login again after profile update
- Display Custom Field for a Specific Role, but not for Admin
- How to get all possible arguments for a wordpress function
- How to extract data from ‘edit my profile’ page in WordPress?
- Easy way to update a single translation entry without having to translate
- WordPress localization – gettext and git
- Is there a possiblity to replace profile image gravatar with custom user images
- Trouble translating a Child Theme
- Translation issue with global variables
- Fix Problem With Textdomain Translation
- WPML icl_register_string() throws fatal error but works [closed]
- Redirecting home to /wp-login.php?action=register
- Problem with Language translation
- POT file generated using WP-CLI does not retrieve strings from translation functions with FQN (Qualifier)
- How can all E-mails be sent with BCC copy to Admin?
- I need a link that directs the user that is logged to his profile
- WordPress theme doesn’t read my translations from pt_BR.po file
- Changing text for “Continue reading…” translation
- Updating User Profile information removes image
- Translation ready code format for taxonomy
- How to Convert Date to Thai
- Plugin Translation project not found
- Plugin translation not being displayed
- Register author, facebook connect, publish posts from front end
- use single form to enter multiple profiles
- Standard way of creating profile pages with custom content for each user?
- Translate Woosidebars plugin strings
- Show infos only to the author in the author.php
- How to create a widget on witch a registered user can create a checklist
- change page name on page list
- get the queried_object of an url
- Tips on using a custom template with Ultimate Member