It turns out, my code above is indeed all that is needed. Apparently the mistake I made was that I didn’t load the translated version of the page in the frontend at least once, so icl_t() didn’t auto-register the strings.
Also keep in mind, if you’re looking at correct string count in String Translation context names, you need to put “theme blah” as your context if you want icl_t() strings to get unified with the rest of the theme strings. Just icl_t( “blah”, … ) will create a new context named exactly “blah”.
Related Posts:
- how to get list of all users and their metadata
- Open Source replacement for WPML? [closed]
- How to make a custom column on the Users admin screen sortable?
- wp_update_user doesn’t update and update_user_meta does
- gettext does not translate when called in ajax
- remove user_meta data from database for all users
- How to get last login Access Date and time
- Best pratice to make taxonomy terms translatable without changing slugs?
- Admin user edit – Grab newly submitted user meta immediately after update/submit
- Validating a new user registration field
- wp_get_current_user in custom file returns 0
- Is there a limit to the length/size of serialized data that can be stored as user meta?
- very last action before during user registration before he is redirected to homepage
- Customizing WP tables or adding new ones?
- Are the default entries for a user in wp_usermeta documented?
- update_user_meta adding new rows in db for same key
- What is the meta-box-order_post_hash used for?
- User meta conventions / name registry, for social media links
- Get user’s ID on logout
- Sanitize textarea instead of input
- Getting $user_id for the_author_meta outside the loop in multisite
- Gravity Custom Merge Tags [closed]
- How to insert new element to existing array in usermeta?
- Fetch ID’s associated with a custom post type when translated with WPML?
- What is the difference between get_the_author_meta() and get_user_meta()?
- Get the Google+ and Twitter links – WordPress SEO plugin
- Should I include colon in my msgid in PO file?
- Showing all users who match 2 meta fields with current user
- Adding current user’s ID to the end of PDF hyperlinks in post content
- add custom field in user register form
- Is it possible to read a result if wp_update_user or update_user_meta fails?
- set a user-meta key as avatar
- Prevent update of custom user profile meta field on the front end after 1st entry
- User last login and user last visit problem
- How to Translate a string of an array inside a class?
- Is there a way to append meta data without creating a race condition?
- trying to determine if meta value exists for user and if not auto submit gravity form to redirect
- get_user_meta returning empty when it’s NOT empty
- Multiple meta values for one meta key
- When is a user’s meta data table loaded?
- Display and Update User Custom Meta via user-edit.php
- Multiple Email Addresses, One User
- WordPress REST API and User meta data
- How do I add a dropdown list of numbers 1 – 1000 as an extra profile field?
- Get user meta for only the keys with a certain prefix
- Serializing User Role for update_user_meta
- Get user_meta values for a user for an array of meta_keys?
- Displaying field value in new column in users view on wordpress
- add_user_meta allows multiple clicks and inserts more than 1 value
- Add user meta fields on creating the user
- English version of my site show french strings [closed]
- How can I undo accidentally duplicated user metadata key values?
- How to add to a user_meta field (append)
- editing usermeta when field is an array
- How to order users by a date in the meta_value array
- How to order custom fields in the user profile (admin area)
- Make dynamic string translatable
- Should I have a single cron job that loops the users, or one for each user?
- Getting a users username in get_user_meta
- Updating user meta on save post
- Save editor’s value in user meta and retrieve it
- How do i put in user id in a banner
- Exclude specific user_id from args in get_comments
- How do I sort a WP_USER_QUERY by multiple meta fields?
- WP_Editor not saving data in user_meta
- Can’t get the user_meta correctly
- Display Country Flag in Profile WordPress/Buddypress
- WordPress Translation to french, at -> à not working
- get random users each time based on the meta key
- How to get metadata (in my case mail) of users who have a certain set of metadata?
- user metadata in json format, update the data partly only
- Structure of multilingual and multiregional directory listing website for translation
- check metadata in wordpress
- Adding user metadata to all users
- Get user count based on multiple meta key values?
- WordPress custom block compatability with WPML
- Existing user_meta fields not updated
- get_the_author_meta i want to write in a loop
- How can I track who clicked what in my member area?
- How to gets users EMAIL by their USERNAME
- Get user meta on registration hook
- Storing data to database and user registration
- update_user_meta inside a popup/modal
- add_user_meta() vs update_user_meta()
- Get all data form users and users metakey
- How to get user meta value in wordpress
- WPML admin texts with serialized objects
- How to display checkbox meta array values one by one?
- Fetch User Meta Data
- How to toggle delete/update user meta values?
- If logged in user meta is
- WP Cron: Save third party data as user meta
- Translate placeholder text in search field
- Multidimensional array problem with update_post_meta [duplicate]
- CRM and newsletter integration? [closed]
- Does WPML translate numbers automatically, or do I have to do the string translation? [closed]
- Strip Twitter Username from Profile Field with URL and Save to New Profile Field
- WPML & Events Manager translatable fields after duplication
- Custom user meta values in shortcode
- Update another users meta