Difference between revisions of "Change Language Files"
PeterRobert (talk | contribs) |
PeterRobert (talk | contribs) |
||
| Line 57: | Line 57: | ||
<div class="mainpage_box"> | <div class="mainpage_box"> | ||
| − | [[File:modules-content-footer-file.jpg|link=|]] | + | [[File:modules-content-footer-file.jpg|link=|1500px]] |
</div> | </div> | ||
Revision as of 14:16, 17 September 2024
Language Files
Phoenix Cart is U.S. English by default but other Language Packs are available to download.
Changes to the text shown in the shop can easily be made to localise and personalise the shop to suit you.
Let's first explain a little about the basic working mechanics of Phoenix Cart.
Using a new installation and the main page (home page) as an example, in your browser go to your website to see similar to this:
Look in your browser address bar and you will see the page as yoursite.com/index.php (if it only shows yoursite.com, click the shop logo to refresh the page) so this page is named index.php.
Note that most everything in CE Phoenix Cart is modularised so a lot of the text showing on the page will be in language files associated with those modules.
As seen in the example, the page could be described in groups of modules.
So, on this page, from the top, there are:
- navbar modules shown in the navigation bar at the top of the page.
- content/header modules shown just below the navigation bar.
- content/index modules shown in the central page contents specific to this page i.e. index
- content/footer modules shown at the base of the page.
- content/footer-suffix modules shown below the footer at the bottom of the page.
There are more modules in other groups on other pages.
As an example, change the text that shows in the About Us section at the base of the page.
To identify the module, first go to
Modules and look in the list there.
It is in the footer so look in the Group column list for files in the footer group.
The About Us section is sorted to show last in the footer.
Text Block can be seen as sorted last in the list of modules in the footer Group.
So, on the server navigate to the /includes/languages/english/modules/content/footer/ folder/directory.
The file, cm_footer_text.php, can be seen there.
In a multi language store, the same file will also be in other language directories, for example, at:
/includes/languages/otherLanguage/modules/content/footer/cm_footer_text.php
Open the language file to see the constants and their values:
The value will be output wherever the constant is used.
Note: Some language files might have the constants written slightly differently like:
Edit
It is important to enter your own text for the pages that customers will use before and after buying, such as the Privacy & Cookie Policy, Terms & Conditions and Shipping & Returns pages
Links to these pages can be seen in the footer of the shop.
The text for these pages are not changed in Language Files but is changed from admin - go to
Tools → Info Pages
For example, go to Tools → Info Pages and double click Privacy & Cookie Policy in the list to edit.
Change the text Put here your Privacy/Cookie Policies Text. to your required text and click Save - done.
The links to these pages are shown in a module in the footer so, for example, to change the text that shows Information go to the Tools → Define Languages list and look for files beginning with modules/content/footer/
The specific file for this module is modules/content/footer/cm_footer_information_links.php
Click it to edit.
Look in the file for the line -
define('MODULE_CONTENT_FOOTER_INFORMATION_HEADING_TITLE', 'Information');
Change Information to your required text and click Save
Open the website page again to see your changes or if you still have the page open, refresh or reload the page to see the changes.
The text that shows Privacy & Cookie Policy can be changed in the same file.
Look in the file for the line -
'privacy.php' => 'Privacy & Cookie Policy',
Change Privacy & Cookie Policy to your required text and click Save
Alternatively, text can be changed in a language file by editing the file on your server or by editing a language file in your backup directory and uploading to overwrite the file on your server.
Just about every page and module in CE Phoenix will work this way and have it's own corresponding language file.
Have a good look in the list, explore and open the files to have a look - as long as you don't change anything, you can't break anything.
The exceptions are the main language files named english.php, there is one for the admin and one for the shop, which control text for many different pages.
Problems finding which file to change? Have a look at How to Change Text
IMPORTANT: If you enter any more quotes in your text, you must use a backslash before the quote e.g. don\'t or you will break things!
Addons
Other Language Packs are published in the Addons Library where the .zip files can be downloaded.
Language Packs are created by and maintained by volunteers so support for them is only available from the author.
Many Addons and Extensions available in the CE Phoenix Cart Addons Library
If help is needed, support is available in the CE Phoenix Cart Support Forum
Phoenix Cart User Guide, like CE Phoenix Cart, is free to use but is maintained by unpaid volunteers.
All other content is the reserved Intellectual Property and Copyright of phoenixcart.org