22

Internationalization & Custom Messages

Last Updated: March 9, 2015

The article below applies to both of the following groups…

A) Customizing DAP’s Default Messages

Those who wish to replace DAP’s default error and success messages (like … “Sorry, No User found with the email address…” when someone is trying to use the “Forgot Password” feature, or the message “Sorry, either you have entered an invalid username/password, or you may not have activated your account yet.” which is shown when someone uses the wrong email/password when logging in to your membership site – with English text of their own choice, and

B) Internationalization

Those who wish to replace those messages with text in a completely different non-English, international language (like Spanish, Danish, French, etc).

Non-English Content

All of your content is really going to be within WordPress, which is already international-friendly, and all of your regular site content – including your sales pages, squeeze pages, member content, etc – can all be presented in any language that WordPress already supports.

DAP is also international-friendly.

DAP really has only 4 member-facing pages: Login Form, “My Content“, “My Profile” and “My Affiliate Info (everything else is within WordPress).

And all of these member pages in DAP can be customized in any non-English language of your choice. We tested with many languages like Spanish, Dutch, French, and even Chinese! Others will/should work too as long the character set is UTF-8 based.

So we’re excited to be able to help you create membership sites in multiple languages.

Non-English Emails

And what’s really cool, is that with DAP, you can also send Autoresponder & Broadcast emails in your language.

This is a very powerful feature for those who are often restricted by 3rd-party email services in sending out non-english emails.

In fact, the last time we checked, even the big-boys like Aweber don’t let you do that!

Customizing Language Files

1) Language File Setup for PHP

Open the file…

/dap/inc/language/english.php

and save the file as…

/dap/inc/language/custom.php

in the same folder.

Then you can change the english text within custom.php (last section that is not in caps – like “Sorry, no data found” in the example below) in your language, and upload it back to the same folder ( /dap/inc/content/language ) back on your site. For example…

define(“MSG_SORRY_NO_DATA_FOUND”,”Sorry, no data found.“);

becomes…

define(“MSG_SORRY_NO_DATA_FOUND”,”Désolé, aucune donnée trouvée.“);

(That’s the French translation, according to Google – blame them if it’s not right 🙂

2) Language File Setup for JavaScript

DAP also allows you to customize the JavaScript alerts and messages that pop-up for client-side validations of form fields.

Open the file…

/dap/inc/language/jsenglish.js

and save the file as…

/dap/inc/language/jscustom.js

…on your desktop. Then change the text inside this jscustom.js file and upload it back to /dap/inc/language/ folder on your web site.

That’s it!

 

Contents of english.php

//———- Added in v4.4 ———//
define(“AFFILIATE_INFO_PERFSUMM_SUBHEADING”,”Affiliate Performance Summary”); //used only in dap/index.php
define(“AFFILIATE_INFO_HEADING”,”Affiliate Details”); //used only in dap/index.php
define(“MSG_NO_COMM”,”Sorry, no commissions earned yet.”);
define(“USER_PROFILE_SUCCESS_MESSAGE_USER”,”SUCCESS! Your profile has been updated.”);
define(“MSG_ERROR_EMAILEXISTSVB”, “Sorry, this email id is already in use in our vBulletin Forum. Please try using a different email id.”);
define(“MSG_SUCCESS_USERUPDATE_NOVB”, “SUCCESS! Your profile has been updated, but could not register this username in our vBulletin Forum. Please contact the site admin for help.”);
define(“AUTOMATED_AUTORESPONDER_EMAIL_SUBJECT”, “New Content Available:\n%%CONTENT_NAME%%”);
define(“MSG_INVALID_PASS”,”Sorry, the password you have chosen contains special characters. Only Alphabets and Numbers allowed. Please go ‘back’ and choose a different password.”);
define(“COLNAME_EARNINGTYPE_TEXT”,”Cash/Credit”);
define(“USER_PROFILE_NEW_PASSWORD_LABEL_DAPUSERPROFILE”,”Password<br/>(only if changing)”);
//———- Added in v4.3 ———//
define(“USER_LINKS_COMINGSOON_TEXT”,”Coming Soon…”);
define(“USER_LINKS_COMINGSOON_PREFIX_TEXT”,”[In XXX day(s)]”); //do not change/remove the text “XXX”
define(“MSG_UNSUBSCRIBE”,”[In XXX days]”); //do not change/remove the text “XXX”
define(“MSG_MANDATORY”,”Sorry, all fields are mandatory. Please go ‘back’ and fill up the missing information.”);
define(“MSG_INVALID_EMAIL”,”Sorry, the email address you entered is invalid. Please go ‘back’ and enter a valid email address.”);
define(“MSG_INVALID_COUPON”,”Sorry, the coupon code you entered is invalid. Please go ‘back’ and enter a valid coupon code.”);
define(“MSG_INVALID_PRODUCT”,”Sorry, the product you are trying to sign up for is either invalid, or not authorized for free signup. Please email the web site owner and let them know about this error.”);
define(“MSG_MISSING_COUPON”,”Sorry, coupon code is a required field. Please go ‘back’ and enter a valid coupon code.”);
define(“MSG_PAYMENT_FAILED”,”Payment failed. Please contact the site admin. “);
define(“MSG_THANKYOU_SIGNUP”,”SUCCESS! Thank you for signing up. Please check your email for further details.”);
define(“BUTTON_UPDATE”,”Update”);
define(“SUCCESS_CREATION”,”SUCCESS! Your account has been successfully created! Please check your inbox for login information…”);
define(“NO_AUTH”,”Sorry, you are either not logged in, or not authorized to perform this operation.”);
define(“MSG_ALREADY_SIGNEDUP”,”It appears that you have already signed up for this. No further action is required at this time.”);

//———- Added 03/22/2011 ———//
define(“MSG_ALREADY_LOGGEDIN_1″,”You are already logged in.”);
define(“MSG_ALREADY_LOGGEDIN_2″,”Click here to continue…”);
define(“MSG_PLS_LOGIN”,”Sorry, you must log in before you can view this content.”);
define(“MSG_CLICK_HERE_TO_LOGIN”,”Click here to log in”);
define(“MSG_SORRY_EMAIL_NOT_FOUND”,”Sorry, No User found with the email address “);
define(“MSG_PASSWORD_SENT”,”Please check your email. Your Password has been sent to “);

//———- GENERAL TEXT ———//
define (“ACTIVATION_EMAIL_SUBJECT”, “%%FIRST_NAME%%, Welcome to %%SITE_NAME%% (Activation)”);
define (“AFF_PAYMENT_EMAIL_SUBJECT”, “%%FIRST_NAME%%, You’ve Got An Affiliate Payment”);
define (“FORGOT_PASSWORD_EMAIL_SUBJECT”, “Lost Password”);
define (“LOCKED_EMAIL_SUBJECT”, “Your account has been locked”);
define (“UNLOCKED_EMAIL_SUBJECT”, “Your account has been Unlocked”);
define (“INVALID_PASSWORD_MSG”,”Sorry, either you have entered an invalid username/password, or you may not have activated your account yet.”);
define(“SUCCESS_ACTIVATION”,”SUCCESS! Your account has been successfully activated! We have now sent you an email with your login details that you can use to log in below…”);

define(“MSG_SORRY_NO_DATA_FOUND”,”Sorry, no data found.”);
define(“COLNAME_AFFID_TEXT”,”Aff Id”);
define(“COLNAME_NAME_TEXT”,”Name”);
define(“COLNAME_FIRSTNAME_TEXT”,”First Name”);
define(“COLNAME_LASTNAME_TEXT”,”Last Name”);
define(“COLNAME_EMAIL_TEXT”,”Email”);
define(“COLNAME_AMTEARNED_TEXT”,”Amount Earned”);
define(“COLNAME_DATETIME_TEXT”,”Date/Time”);
define(“COLNAME_AMTPAID_TEXT”,”Amount Paid”);
define(“COLNAME_HTTPREFERER_TEXT”,”HTTP Referer”);
define(“COLNAME_DESTINATION_TEXT”,”Destination”);

//———- USER PROFILE TEXT ———//
define(“USER_PROFILE_HEADING_TEXT”,”Profile Information”);
define(“USER_PROFILE_FIRST_NAME_LABEL”,”First Name”);
define(“USER_PROFILE_LAST_NAME_LABEL”,”Last Name”);
define(“USER_PROFILE_EMAIL_LABEL”,”Email”);
define(“USER_PROFILE_USER_NAME_LABEL”,”Username”);
define(“USER_PROFILE_NEW_PASSWORD_LABEL”,”Password”);
define(“USER_PROFILE_REPEAT_PASSWORD_LABEL”,”Repeat Password”);
define(“USER_PROFILE_PAYPAL_EMAIL_LABEL”,”Paypal Email”);
define(“USER_PROFILE_PAYPAL_EMAIL_EXTRA_LABEL”,”For Affiliates Only”);
define(“USER_PROFILE_COMPANY_LABEL”,”Company”);
define(“USER_PROFILE_TITLE_LABEL”,”Title”);
define(“USER_PROFILE_ADDRESS1_LABEL”,”Address 1″);
define(“USER_PROFILE_ADDRESS2_LABEL”,”Address 2″);
define(“USER_PROFILE_CITY_LABEL”,”City”);
define(“USER_PROFILE_STATE_LABEL”,”State”);
define(“USER_PROFILE_ZIP_LABEL”,”Zip”);
define(“USER_PROFILE_COUNTRY_LABEL”,”Country”);
define(“USER_PROFILE_PHONE_LABEL”,”Phone”);
define(“USER_PROFILE_FAX_LABEL”,”Fax”);
define(“USER_PROFILE_UNSUBSCRIBE_LABEL”,”You are currently receiving product and <br/>account related emails. Uncheck to stop<br/>receiving all emails (not recommended)”);
define(“USER_PROFILE_SUCCESS_MESSAGE”,”SUCCESS! User has been successfully updated.”);

//———- AFFILIATE PAGE LABELS ———//
define(“AFFILIATE_INFO_TOTALEARNINGS_SUBHEADING”,”Total Earnings”);
define(“AFFILIATE_INFO_AFFLINK_SUBHEADING”,”Affiliate Link”);
define(“AFFILIATE_INFO_YOURAFFLINKHOME_LABEL”,”Your Affiliate Link – redirects to home page:”);
define(“AFFILIATE_INFO_AFFLINKSPECIFIC_LABEL”,”Affiliate Link To Specific Page:”);
define(“AFFILIATE_INFO_AFFLINKSPECIFIC_EXTRA_TEXT”,”To link to a specific page, just add the text &quot;&amp;p=&lt;insert_url_here&gt;&quot; to the end of your affiliate link, like this: (no &quot;http://&quot; in the 2nd link at the end – should start with &quot;www&quot;)”);
define(“AFFILIATE_INFO_TEST_TEXT”,”test”);
define(“AFFILIATE_INFO_PAYMENT_DETAILS_SUBHEADING”,”Payment Details”);
define(“AFFILIATE_INFO_EARNINGS_DETAILS_SUBHEADING”,”Earnings Details”);
define(“AFFILIATE_INFO_TRAFFIC_STATISTICS_SUBHEADING”,”Traffic Statistics”);

//———- USER LINKS PAGE TEXT ———//
define(“USER_LINKS_YOUCURRENTLYHAVEACCESSTO_TEXT”,”You currently have access to “);
define(“USER_LINKS_PRODUCTS_TEXT”,” product(s).”);
define(“USER_LINKS_ACCESS_START_DATE_TEXT”,”Access Start Date”);
define(“USER_LINKS_ACCESS_END_DATE_TEXT”,”Access End Date”);
define(“USER_LINKS_DESCRIPTION_TEXT”,”Description”);
define(“USER_LINKS_LINKS_TEXT”,”Links”);
define(“USER_LINKS_NOLINKSFOUND_TEXT”,”No links found.”);

 

Contents Of jsenglish.php

//New entry MSG_EMAIL_INVALID added on 07/14/2011
var MSG_EMAIL_INVALID = “Sorry, email id must of a valid format, may not be blank or contain any special characters”;

var MSG_MISSING_INFO = “Please enter missing information…”;

var MSG_ENTER_EMAIL = “Please enter your email address before we can email you the password”;

var MSG_ENTER_PASSWORD = “Sorry, the password field may not be empty”;

var MSG_PASSWORDS_MISMATCH = “The two Passwords don’t match. Please try again…”;

var MSG_PASSWORD_INVALID = “Sorry, password contains invalid characters. Please choose from numbers and alphabets only.”;

var MSG_UPDATING_PROFILE = “Please wait… Updating User Profile …”;

var MSG_OPTOUT_WARNING = “WARNING: If you uncheck this box, you may not receive emails relevant to the product you have purchased. Are you sure you still want to Unsubscribe?”;

var MSG_NO_SPECIAL = “Sorry, no special characters allowed”;

Other links….

To customize the DAP Stand-alone Login form, click here.

To customize the DAP Login/Logout widget, click here.

To customize the DAP default Error Message with the ‘Lock’ image, click here.

Click Here to Leave a Comment Below 22 comments
Kenneth - March 23, 2011

I have a license to use DAP on 1 site – can I create a subdirectory for Spanish speaking members and use this feature?

Or do I need to get another license and recreate my entire site in the subdirectory?

Reply
Veena Prashanth - March 24, 2011

DAP needs to be installed to the root of each website. You cannot install DAP in a subdirectory.

See – http://www.digitalaccesspass.com/doc/content-protection-big-picture/

You will need another license of DAP for installation on a domain for Spanish speaking members.

Reply
Kenneth - March 24, 2011

Thanks Veena – That clarifies it. I’ll get my english site launched first – i can always get a spanish version setup later.

Reply
Thomas - May 28, 2011

Hi Veena, my english language file is on this path: /dap/inc/language/english.php

… in my content folder is no language folder – is that right?

(DAP v4.1)

Thomas

Reply
Veena Prashanth - May 28, 2011

Hi Thomas,

If you do not find “language” folder within /dap/inc, then you didnot install dap 4.1 correctly.

You can download 4.1 again from our site and upload it to your site and the language folder should show up.

Reply
Olivier - December 27, 2011

Awesome! I’ve translated both files (english.php and jsenglish.js) to French. But so far no changes! How do I tell WordPress to use my new files (french.php) instead of the original files (english.php)?

Reply
Veena Prashanth - December 27, 2011

Rename /dap/inc/language/french.php to /dap/inc/language/custom.php. DAP will automatically pick up custom.php

Reply
Olivier - December 27, 2011

Great!

But when doing this, the all site becomes unaccessible. All pages return this error:
Parse error: syntax error, unexpected T_STRING in http://site.com/dap/inc/language/custom.php on line 44

Deleting line 44 return […]on line 45

What’s wrong?

Thanks, Olivier

Reply
Veena Prashanth - December 27, 2011

It means whatever you entered in line 44/45 in custom.php, is not in the right format. There is a syntax error in that line.

Reply
Olivier - December 28, 2011

You’re right, there was an error on line 43…

Also all accents were wrong, I had to save the file in UTF-8 format.

Still, I don’t see the lines for translating the login module:
– Email
– Password
– Remember me (for 2 weeks)
– Forgot Password
– Login button

What are the lines?

Thanks, Olivier

Reply
Olivier - December 29, 2011

Hi, I’ve opened the file inc/content/login.inc.php and “hard edited” the lines that needed to be translanted.
I don’t like this because the file will be overwritten on the next update. Lines are #16, 17, 21, 31 and 38.

But that didn’t solve my problem. I need to translate the login module as %%LOGIN_FORM%%. Editing the login.inc.php didn’t change anything. Where are the lines for that module?

Thanks, Olivier

Reply
Veena Prashanth - December 29, 2011

You need to customize the login form.

You will find the documentation in content customization section under http://www.digitalaccesspass.com/documentation

Reply
Olivier - December 29, 2011

Great! I edited the file wp-content/plugins/DAP-WP-LiveLinks/DAP-WP-LoginForm.html, renamed it to wp-content/plugins/DAP-WP-LiveLinks/customDAP-WP-LoginForm.html. It worked fine. Thanks.

Reply
Veena Prashanth - December 29, 2011

That’s it. Thanks for the update.

Reply
laurence galambert - February 14, 2012

Beginner’s question: how do I change the php document. I cannot open it on my computer. Do I need a specific software in order to change a php document?

Reply
Veena Prashanth - February 14, 2012

You can edit it using notepad.

Reply
Urs - March 24, 2013

It would be great if people who have already done a translation in any language would share these custom files. Perhaps the DAP site could then share these files. I am sure many international users would appreciate that.

Reply
Laurent - August 6, 2013

Hello,

Olivier, would you be kind enough to provide the french translated files ?

Thanks

Reply
Pavel - January 12, 2014

Hi Veena ,

how do I change (translate) parts of the Members home page, which are not part of the “custom.php” and “jscustom.js” files? Specifically there 3 sections:
—————–
Thank you for purchasing our product. Appreciate your business.
Below, you will find various links that are part of this product.
Customize this message by clicking on Templates (“Setup > Templates” in DAP Dashboard) and then editing the template

Hello Friend.

You currently have access to 1 product(s).
—————–
Refer your friends and get paid!

Below, you will find your affiliate link that you can use to send in an email to your friends and contacts, or you could publish it on your web site, and when someone clicks on that link and purchases one of our products, you can earn a cool commission on each sale!

Customize this message by clicking on the Templates link above and then selecting
—————–
Affiliate Id, Name ,Email, Clicks, Referrals,
(Free & Paid), Cash Earned, Credits Earned, Sales Generated, Earnings Per Click (EPC)
Sorry, no data found.
—————–
Can you please let me know

Thanks Pavel

P.S.
I can provide “custom.php” and “jscustom.js” files translation into Czech for DAP Community.

Reply
Veena Prashanth - January 13, 2014

Hi Pavel,

>> Thank you for purchasing our product. Appreciate your business. Below, you will find various links that are part of this product. Customize this message by clicking on Templates (“Setup > Templates” in DAP Dashboard) and then editing the template < < Some of the messages can be customized in DAP setup -> Templates section. Did you not find it there?

>>I can provide “custom.php” and “jscustom.js” files translation into Czech for DAP Community. << Cool. Thanks Pavel :). Please attach it to a dap support ticket or email it to us. Thanks, Veena

Reply
James O'Malley - April 23, 2014

Hello Veena,

Can I utilize the WPML language plugin with DAP pages and email auto responders?

I am developing a process for site-wide language localization and want to establish it with well supported tools from the start.

Thank you again for such a cool tool as DAP!

Jamie

Reply
Ravi Jayagopal - April 24, 2014

Hi James,

Sorry, DAP does not support the WPML language plugin. This page right here – http://DigitalAccessPass.com/doc/internationalization/ – shows the DAP files that can be customized for internationalization support on DAP pages. For the autoresponders, you can simply paste the text in any UTF-8 based language directly into DAP and DAP will send it in that language.

Reply

Leave a Reply: