Skip to main content

Customize the Text & Strings in the Freemius WordPress SDK

All the SDK's text and strings are customizable. Every string has its own unique key which you can use to override it.

For example, You can use the fs_override_i18n() function to customize the button labels:

Using plugin slug

fs_override_i18n( array(
'opt-in-connect' => __( "Yes - I'm in!", '{your-text_domain}' ),
'skip' => __( 'Not today', '{your-text_domain}' ),
), '{your_slug}' );

Using the Freemius class

override_i18n() is a public method of the Freemius class, so you can use it as following:

For example to customize the button labels:

// Replace `my_fs()` with your actual Freemius instance name.
my_fs()->override_i18n( array(
'opt-in-connect' => __( "Yes - I'm in!", '{your-text_domain}' ),
'skip' => __( 'Not today', '{your-text_domain}' ),
) );

Or control the in-dashboard trial promotion in the Freemius WordPress SDK

my_fs()->override_i18n(
array(
'hey' => 'Hey',
'trial-x-promotion-message' => 'Thank you so much for using %s!',
'already-opted-in-to-product-usage-tracking' => 'How do you like %s so far? Test all our %s premium features with a %d-day free trial.',
'start-free-trial' => 'Start free trial',
// Trial with a payment method required.
'no-commitment-for-x-days' => 'No commitment for %s days - cancel anytime!',
// Trial without a payment method.
'no-cc-required' => 'No credit card required',
)
);