Coupon Creator

  • Coupon Creator Pro
    • Coupon Creator Pro
    • Feature Demos
    • Premium Features
    • Release Notes
    • New Feature Suggestions
  • Support
    • Contact Support
    • Guides (Start Here)
    • Frequently Asked Questions
    • Documentation
    • Tutorials
    • Support Terms
  • Contact
  • My Account
  • 0 items

How to Change or Translate Text in the Coupon Creator such as Click to Print

Posted on 11.05.14 | brianjessee |

Knowledge Base


How to Change or Translate Text in the Coupon Creator such as Click to Print

Last Updated: 4 years ago in Customization
The Coupon Creator is translation ready and a complete translation in other language is forth coming, but you can take advantage of WordPress Filters to change the text on your own right now.

Below is coding you can add to your site to your site or you can use a plugin such as Say what?

The following example changes the Coupon Creator Pro’s Counter text and also the Click to Print text.

You can experiment with this coding to add your translations to any of the frontend or backend text produced by the Coupon Creator.

Add the following coding to custom plugin or to your child theme’s function.php:

/**
 * Coupon Creator Filter Text Change the Counter Text "%d of %d" and "Click to Print"
 *
 * @since 2.1
 *
 * @param string $translations 	Translations for a domain
 * @param string $text       	Text to translate
 * @param string $domain     	Translation Domain
 */
 add_filter('gettext', 'cctor_filter_plugin_text', 20, 3);
function cctor_filter_plugin_text ( $translations, $text, $domain ) {
 
	// Put your custom text here in a key => value pair
	// Example: 'Text you want to change' => 'This is what it will be changed to'
	// The text you want to change is the key, and it is case-sensitive
	// The text you want to change it to is the value
	// You can freely add or remove key => values, but make sure to separate them with a comma
	// This example changes the label "'%d of %d" to "%d out of %d", and "Click to Print" to "Print the Coupon"
	$custom_text = array(
		'%d of %d' => '%d out of %d',
		'Click to Print' => 'Print the Coupon',
		'Categories' => 'Kategorier',
	);
 
	// If this text domain starts with "tribe-" or "the-events-", and we have replacement text
	if((strpos($domain, 'coupon-') === 0 || strpos($domain, 'coupon-creator') === 0) && array_key_exists($text, $custom_text) ) {
		$text = $custom_text[$text];
	}
 
	return $text;
}

1 star1 star1 star1 star1 star
4.3 out of 5 stars
Downloads!

Get Started With Pro

Click to Buy Pro

What Users are Saying:


Simple Solution for My Site — First Rate Support! – A simple and useful plugin that offers a perfect solution for my website. … The videos are extremely helpful. Support from the developer was fast and very helpful…more

— Mike (msagman)

5-Star Rating All Day Long – I strongly recommend using this plugin if you EVER need a “Top Of The Line” well designed, clean coded, lightweight, easy to manage and style coupon plugin for whatever reason for your WP site….more

— Fish (fish911)

Wonderful Plugin & Top Notch Support – We purchased the pro version of this plugin after reviewing the free version for a while. The free version is great, but we needed some of the more advanced features that the pro version offered…more

— (infobeckettgraphics)

My client needed a coupon creator to add the mobile equivalent of clip-out paper coupons for their website. This Coupon Creator plugin was the best, most reliable solution that allows my client to easily make decent-to-good looking online coupons in-house with a minimum of design experience and fuss. Many other coupon plugins actually only generate coupon codes a-la RetailMeNot. This one lets you generate printable coupon-looking coupons or responsive, mobile-friendly discount coupons that users can pull up on their smartphone right there at the merchant.

— (typeadesign)

Great Support – I am using Coupon Creator fee version on two sites and love it! Easy to use and great support! Just what I was looking for.

— Kay (stahr5)

Login

  • Lost Password

Support Resources

  • Guides
  • Frequently Asked Questions
  • Documentation
  • Tutorials

Sign Up for Updates!

For the Coupon Creator Pro!

  • This field is for validation purposes and should be left unchanged.
  • Coupon Creator Pro
  • Coupon Creator
  • Guides
  • Frequently Asked Questions
  • Terms of Service
  • Privacy Policy

Copyright © 2023 Site · WordPress Web Design by Jessee Productions, LLC

7ads6x98y