Support Forums - Classified Ads Script Osclass
General osclass questions => General discussion => Topic started by: MB Themes on October 22, 2020, 08:23:14 PM
-
Only available for new (non existing) translations of Osclass core. All other translations can now be easily handled by DeepL Translator Plugin (https://osclasspoint.com/osclass-plugins/backoffice/deepl-translator-free-plugin-for-classifieds-i209) that provides translations of same quality as human.
Are you looking for premium/paid products, but you have 0 budget or cannot afford it?
No worry! There is way to you to get legitimate license for paid product (without support pack).
How to:
1) Translate Osclass core (theme.po, core.po, messages.po), premium Theme (theme.po) or premium Plugin (messages.po)
2) Create language pack:
- for core, it must include theme.po, core.po, messages.po; but also index.php and mail.sql
- besides .po files, always include also .mo files those are source of translations for Osclass
- for existing languages, always update all .po files from latest osclass version (update from source code) before starting translation
- for new languages, its best to duplicate existing language pack (en_US) and create your version, let's say sk_SK.
-- to achieve this, update index.php occurences from en_US to sk_SK and name translation properly, update mail.php occurences from en_US to sk_SK and translate mails. Escape single apostrophe with backslash... "'" => "\'", example: "it's" => "it\'s"
-- find list of 2-letter language codes here: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes , in most cases first two and last two letters are same. Keep in mind first two are lower case and last two are uppercase.
-- update all .po files and translate them
3) place all files (.po, .mo, .php - if applicable) into folder with language code. I.e. folder name would be: en_US, sk_SK, cz_CZ, de_DE, ar_SY, ...
4) ZIP this folder and name it properly:
- Core: YYYYMMDD_lang_osclass_LANGCODE_VERSION.zip
- Theme: YYYYMMDD_lang_PRODNAME_LANGCODE_VERSION.zip
- Plugin: YYYYMMDD_lang_PRODNAME_LANGCODE_VERSION.zip
Explanation & details:
- YYYYMMDD - is date of translation, example: 20221231, 20230101, 20230320
- LANGCODE - same as translation folder name & code, example: en_US, de_DE, ar_SY, ru_RU, ...
- VERSION - version of osclass or product using dots, example: 1.3.0, 2.13.5, 3.0.0, 4.0.5, 2.0.16, ...
- PRODNAME - name of product folder (when theme/plugin is installed it has own folder name in oc-content/themes or oc-content/plugins). Underscode is replaced with dash!!!!. Example: epsilon, delta, blog, gdpr, instant-messenger, item-validation, osclass-pay, business-profile, ...
How to get theme/plugin .po files for translation:
- Let's use Instant Messenger Plugin as example for this
- Go to product page, example: https://osclasspoint.com/osclass-plugins/messaging-and-communication/instant-messenger-plugin-i50
- Click on "Backoffice demo" button, it should take you to configure page of plugin (if not, go to Plugins > Plugin name > Configure), example: https://plugins3.abprofitrade.eu/oc-admin/index.php?page=plugins&action=renderplugin&file=instant_messenger/admin/configure.php
- notice parameter "file": instant_messenger/admin/configure.php, it will always start with "PRODNAME", in this case instant_messenger
- You can now get original .po file using URL: DEMO_BASE_URL/oc-content/plugins/PRODNAME/languages/en_US/messages.po
- For themes, path is little different: DEMO_BASE_URL/oc-content/themes/PRODNAME/languages/en_US/theme.po
- Sample paths: https://plugins3.abprofitrade.eu/oc-content/plugins/instant_messenger/languages/en_US/messages.po
- If you have problem to identify plugin/theme folder name, you can view into source code as well
You have translation, what's next:
- To get free product as exchange for translation, you must have at least ~2000 terms translated, alternatively 7 different products (theme/plugin).
- Send it to info@osclasspoint.com with title "Call for translation" and specify product you would like to get
- After validating translations, you will receive link to download product back to your mail
Restrictions:
- not apply to existing translations (except osclass core, if current translation is older than 3 major versions)
- not apply to free themes/plugins
Sample starting index.php
<?php
function locale_en_US_info() {
return array(
'name' => 'English (US)',
'short_name' => 'English',
'description' => 'American english translation',
'version' => '8.0.2',
'author_name' => 'OsclassPoint',
'author_url' => 'https://osclass-classifieds.com/',
'currency_format' => '{NUMBER} {CURRENCY}',
'date_format' => 'm/d/Y',
'stop_words' => 'i,a,about,an,are,as,at,be,by,com,for,from,how,in,is,it,of,on,or,that,the,this,to,was,what,when,where,who,will,with,the'
);
}
?>
Sample modified index.php
<?php
function locale_[u]sk_SK[/u]_info() {
return array(
'name' => 'Slovak',
'short_name' => 'Slovak',
'description' => 'Slovak translation',
'version' => '8.0.2',
'author_name' => 'OsclassPoint',
'author_url' => 'https://osclass-classifieds.com/',
'currency_format' => '{NUMBER} {CURRENCY}',
'date_format' => 'm/d/Y',
'stop_words' => 'a,az,i,s,od'
);
}
?>
Sample mail.php file:
INSERT INTO /*TABLE_PREFIX*/t_pages_description (fk_i_pages_id, fk_c_locale_code, s_title, s_text) VALUES (1, 'en_US', '{WEB_TITLE} - Someone has a question about your listing', '<p>Hi {CONTACT_NAME}!</p><p>{USER_NAME} ({USER_EMAIL}, {USER_PHONE}) left you a message about your listing <a href="{ITEM_URL}">{ITEM_TITLE}</a>:</p><p>{COMMENT}</p><p>Regards,</p><p>{WEB_LINK}</p>');
INSERT INTO /*TABLE_PREFIX*/t_pages_description (fk_i_pages_id, fk_c_locale_code, s_title, s_text) VALUES (2, 'en_US', 'Please validate your {WEB_TITLE} account', '<p>Hi {USER_NAME},</p><p>Please validate your registration by clicking on the following link: {VALIDATION_LINK}</p><p>Thank you!</p><p>Regards,</p><p>{WEB_LINK}</p>');
INSERT INTO /*TABLE_PREFIX*/t_pages_description (fk_i_pages_id, fk_c_locale_code, s_title, s_text) VALUES (3, 'en_US', '{WEB_TITLE} - Registration successful!', '<p>Hi {USER_NAME},</p><p>You\'ve successfully registered for {WEB_LINK}.</p><p>Thank you!</p><p>Regards,</p><p>{WEB_LINK}</p>');
INSERT INTO /*TABLE_PREFIX*/t_pages_description (fk_i_pages_id, fk_c_locale_code, s_title, s_text) VALUES (4, 'en_US', 'Look at what I discovered on {WEB_TITLE}', '<p>Hi {FRIEND_NAME},</p><p>Your friend {USER_NAME} wants to share this listing with you <a href="{ITEM_URL}">{ITEM_TITLE}</a>.</p><p>Message:</p><p>{COMMENT}</p><p>Regards,</p><p>{WEB_TITLE}</p>');
INSERT INTO /*TABLE_PREFIX*/t_pages_description (fk_i_pages_id, fk_c_locale_code, s_title, s_text) VALUES (5, 'en_US', '{WEB_TITLE} - New listings in the last hour', '<p>Hi {USER_NAME},</p><p>New listings have been published in the last hour. Take a look at them:</p><p>{ADS}</p><p>-------------</p><p>To unsubscribe from this alert, click on: {UNSUB_LINK}</p><p>{WEB_LINK}</p>');
INSERT INTO /*TABLE_PREFIX*/t_pages_description (fk_i_pages_id, fk_c_locale_code, s_title, s_text) VALUES (6, 'en_US', '{WEB_TITLE} - New listings in the last day', '<p>Hi {USER_NAME},</p><p>New listings have been published in the last day. Take a look at them:</p><p>{ADS}</p><p>-------------</p><p>To unsubscribe from this alert, click on: {UNSUB_LINK}</p><p>{WEB_LINK}</p>');
INSERT INTO /*TABLE_PREFIX*/t_pages_description (fk_i_pages_id, fk_c_locale_code, s_title, s_text) VALUES (7, 'en_US', '{WEB_TITLE} - New listings in the last week', '<p>Hi {USER_NAME},</p><p>New listings have been published in the last week. Take a look at them:</p><p>{ADS}</p><p>-------------</p><p>To unsubscribe from this alert, click on: {UNSUB_LINK}</p><p>{WEB_LINK}</p>');
INSERT INTO /*TABLE_PREFIX*/t_pages_description (fk_i_pages_id, fk_c_locale_code, s_title, s_text) VALUES (8, 'en_US', '{WEB_TITLE} - New listings', '<p>Hi {USER_NAME},</p><p>A new listing has been published, check it out!</p><p>{ADS}</p><p>-------------</p><p>To unsubscribe from this alert, click on: {UNSUB_LINK}</p><p>{WEB_LINK}</p>');
INSERT INTO /*TABLE_PREFIX*/t_pages_description (fk_i_pages_id, fk_c_locale_code, s_title, s_text) VALUES (9, 'en_US', '{WEB_TITLE} - New comment', '<p>Someone commented on the listing <a href="{ITEM_URL}">{ITEM_TITLE}</a>.</p><p>Commenter: {COMMENT_AUTHOR}<br />Commenter\'s email: {COMMENT_EMAIL}<br />Title: {COMMENT_TITLE}<br />Comment: {COMMENT_TEXT}</p>');
INSERT INTO /*TABLE_PREFIX*/t_pages_description (fk_i_pages_id, fk_c_locale_code, s_title, s_text) VALUES (10, 'en_US', '{WEB_TITLE} - Edit options for the listing {ITEM_TITLE}', '<p>Hi {USER_NAME},</p><p>You\'re not registered at {WEB_LINK}, but you can still edit or delete the listing <a href="{ITEM_URL}">{ITEM_TITLE}</a> for a short period of time.</p><p>You can edit your listing by following this link: {EDIT_LINK}</p><p>You can delete your listing by following this link: {DELETE_LINK}</p><p>If you register as a user, you will have full access to editing options.</p><p>Regards,</p><p>{WEB_LINK}</p>');
INSERT INTO /*TABLE_PREFIX*/t_pages_description (fk_i_pages_id, fk_c_locale_code, s_title, s_text) VALUES (11, 'en_US', '{WEB_TITLE} - Validate your listing', '<p>Hi {USER_NAME},</p><p>You\'re receiving this e-mail because a listing has been published at {WEB_LINK}. Please validate this listing by clicking on the following link: {VALIDATION_LINK}. If you didn\'t publish this listing, please ignore this email.</p><p>Listing details:</p><p>Contact name: {USER_NAME}<br />Contact e-mail: {USER_EMAIL}</p><p>{ITEM_DESCRIPTION}</p><p>Url: {ITEM_URL}</p><p>Regards,</p><p>{WEB_LINK}</p>');
INSERT INTO /*TABLE_PREFIX*/t_pages_description (fk_i_pages_id, fk_c_locale_code, s_title, s_text) VALUES (12, 'en_US', '{WEB_TITLE} - A new listing has been published', '<p>Dear {WEB_TITLE} admin,</p><p>You\'re receiving this email because a listing has been published at {WEB_LINK}.</p><p>Listing details:</p><p>Contact name: {USER_NAME}<br />Contact email: {USER_EMAIL}</p><p>{ITEM_DESCRIPTION}</p><p>Url: {ITEM_URL}</p><p>You can edit this listing by clicking on the following link: {EDIT_LINK}</p><p>Regards,</p><p>{WEB_LINK}</p>');
INSERT INTO /*TABLE_PREFIX*/t_pages_description (fk_i_pages_id, fk_c_locale_code, s_title, s_text) VALUES (13, 'en_US', '{WEB_TITLE} - Recover your password', '<p>Hi {USER_NAME},</p><p>We\'ve sent you this e-mail because you\'ve requested a password reminder. Follow this link to recover it: {PASSWORD_LINK}</p><p>The link will be deactivated in 24 hours.</p><p>If you didn\'t request a password reminder, please ignore this message. This request was made from IP {IP_ADDRESS} on {DATE_TIME}</p><p>Regards,</p><p>{WEB_LINK}</p>');
INSERT INTO /*TABLE_PREFIX*/t_pages_description (fk_i_pages_id, fk_c_locale_code, s_title, s_text) VALUES (14, 'en_US', '{WEB_TITLE} - You requested an email change', '<p>Hi {USER_NAME}</p><p>You\'re receiving this e-mail because you requested an e-mail change. Please confirm this new e-mail address by clicking on the following validation link: {VALIDATION_LINK}</p><p>Regards,</p><p>{WEB_LINK}</p>');
INSERT INTO /*TABLE_PREFIX*/t_pages_description (fk_i_pages_id, fk_c_locale_code, s_title, s_text) VALUES (15, 'en_US', '{WEB_TITLE} - Please validate your alert', '<p>Hi {USER_NAME},</p><p>Please validate your alert registration by clicking on the following link: {VALIDATION_LINK}</p><p>Thank you!</p><p>Regards,</p><p>{WEB_LINK}</p>');
INSERT INTO /*TABLE_PREFIX*/t_pages_description (fk_i_pages_id, fk_c_locale_code, s_title, s_text) VALUES (16, 'en_US', '{WEB_TITLE} - Your comment has been approved', '<p>Hi {COMMENT_AUTHOR},</p><p>Your comment on <a href="{ITEM_URL}">{ITEM_TITLE}</a> has been approved.</p><p>Regards,</p><p>{WEB_LINK}</p>');
INSERT INTO /*TABLE_PREFIX*/t_pages_description (fk_i_pages_id, fk_c_locale_code, s_title, s_text) VALUES (17, 'en_US', '{WEB_TITLE} - Validate your listing', '<p>Hi {USER_NAME},</p><p>You\'re receiving this e-mail because you\’ve published a listing at {WEB_LINK}. Please validate this listing by clicking on the following link: {VALIDATION_LINK}. If you didn\'t publish this listing, please ignore this e-mail.</p><p>Listing details:</p><p>Contact name: {USER_NAME}<br />Contact e-mail: {USER_EMAIL}</p><p>{ITEM_DESCRIPTION}</p><p>Url: {ITEM_URL}</p><p>Even if you\'re not registered at {WEB_LINK}, you can still edit or delete your listing:</p><p>You can edit your listing by following this link: {EDIT_LINK}</p><p>You can delete your listing by following this link: {DELETE_LINK}</p><p>Regards,</p><p>{WEB_LINK}</p>');
INSERT INTO /*TABLE_PREFIX*/t_pages_description (fk_i_pages_id, fk_c_locale_code, s_title, s_text) VALUES (18, 'en_US', '{WEB_TITLE} - A new user has registered', '<p>Dear {WEB_TITLE} admin,</p><p>You\'re receiving this email because a new user has been created at {WEB_LINK}.</p><p>User details:</p><p>Name: {USER_NAME}<br />E-mail: {USER_EMAIL}</p><p>Regards,</p><p>{WEB_LINK}</p>');
INSERT INTO /*TABLE_PREFIX*/t_pages_description (fk_i_pages_id, fk_c_locale_code, s_title, s_text) VALUES (19, 'en_US', '{WEB_TITLE} - Someone has a question for you', '<p>Hi {CONTACT_NAME}!</p><p>{USER_NAME} ({USER_EMAIL}, {USER_PHONE}) left you a message:</p><p>{COMMENT}</p><p>Regards,</p><p>{WEB_LINK}</p>');
INSERT INTO /*TABLE_PREFIX*/t_pages_description (fk_i_pages_id, fk_c_locale_code, s_title, s_text) VALUES (20, 'en_US', '{WEB_TITLE} - Someone has commented on your listing', '<p>There\'s a new comment on the listing: <a href="{ITEM_URL}">{ITEM_TITLE}</a>.</p><p>Author: {COMMENT_AUTHOR}<br />Author\'s email: {COMMENT_EMAIL}<br />Title: {COMMENT_TITLE}<br />Comment: {COMMENT_TEXT}</p><p>{WEB_LINK}</p>');
INSERT INTO /*TABLE_PREFIX*/t_pages_description (fk_i_pages_id, fk_c_locale_code, s_title, s_text) VALUES (21, 'en_US', '{WEB_TITLE} - Success creating admin account!', '<p>Hi {ADMIN_NAME},</p><p>The admin of {WEB_LINK} has created an account for you,</p><ul><li>Username: {USERNAME}</li><li>Password: {PASSWORD}</li></ul><p>You can access the admin panel here {WEB_ADMIN_LINK}.</p><p>Thank you!</p><p>Regards,</p>');
INSERT INTO /*TABLE_PREFIX*/t_pages_description (fk_i_pages_id, fk_c_locale_code, s_title, s_text) VALUES (22, 'en_US', '{WEB_TITLE} - Your ad is about to expire', '<p>Hi {USER_NAME},</p><p>Your listing <a href="{ITEM_URL}">{ITEM_TITLE}</a> is about to expire at {WEB_LINK}.');
-
-- This topic is locked, you cannot ask questions or respond here. Create new topic if you have some questions --
-
-- Attaching random translations just as a reference for naming convention of packages --