Difference between revisions of "Editing Site Text"

From AWBS Wiki
Jump to: navigation, search
(Changing site character set)
(Changing site character set)
 
(One intermediate revision by the same user not shown)
Line 31: Line 31:
 
== Changing site character set ==
 
== Changing site character set ==
  
Edit the templates/''your_theme_directory''/header.php file.
+
Edit the includes/language/english/global.php file.
  
Change this line as desired:
+
Change this line as desired editing only between the quotes:
 +
 
 +
define(CHARSET,    "iso-8859-1");
 +
 
 +
Note: if you offer more than one language, set this in each language directory along with the CONTENTLANG setting.
  
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 
  
  
Line 46: Line 49:
  
  
Although the admin area is not translatable, you may wish to set the content language for the admin area.
+
Although the admin area is not fully translatable, you may wish to set the content language for the admin area.
 
Configuration, Extended System Configuration, edit the ''content_lang'' value
 
Configuration, Extended System Configuration, edit the ''content_lang'' value
  

Latest revision as of 09:33, February 2, 2011

Language files are responsible for the text content on the site.

Location: includes/language/english

In the includes/language/english directory, there is a list of language files. The language files are named the same as the corresponding website page files.

The global.php language file contains text content from multiple pages or that needed to be globally included.

Look for the filename of the page you want to change the text content and edit the text you want to change.

Wordpad or a basic text editor should be used.

Note: It is important that no extra spaces or line breaks are at the end of the file. This can cause blank pages or incorrectly displayed website pages.


If you offer multiple languages, be sure to edit all languages when you edit.


Adding a new language

If you wish to offer more/other languages, create a new directory in the includes/language directory.

Name it how you wish it to appear for users to select their language. Example: If you want to add spanish, you would create the spanish directory in the includes/language directory.

Copy all contents of the english directory to the new directory and translate all files within that directory to the chosen language. Wordpad or a basic text editor should be used.

Note: It is important that no extra spaces or line breaks are at the end of the file. This can cause blank pages or incorrectly displayed website pages.


Changing site character set

Edit the includes/language/english/global.php file.

Change this line as desired editing only between the quotes:

define(CHARSET,     "iso-8859-1");

Note: if you offer more than one language, set this in each language directory along with the CONTENTLANG setting.


For email template character set; Configuration, Extended System Configuration, edit the mail_charset value


For the contact form character set; Configuration, Extended System Configuration, edit the cfcharset value


Although the admin area is not fully translatable, you may wish to set the content language for the admin area. Configuration, Extended System Configuration, edit the content_lang value

Setting the default language

After adding a new language, you may wish to set it as your site's default language. To do so, login to your AWBS system as a user with configuration access. Navigate to the Configuration area, click the System Options link. Scroll down to the 'Look and Feel' section. Set the 'Language' setting as desired and click the 'Save Changes' button.

Enabling Users to select thier own language

If you have multiple languages, you can allow your customers to select their preferred language. As soon as they login to their account, AWBS will change to their selected default language. To enable this feature, login to your AWBS site as super admin, navigate to the Configuration area, click on the System Options link. Scroll to the 'User/Account Defaults' section and set 'Enable user select email type?' to True and click the Save Changes button at the bottom of the page.

Your customers will be able to set their default language when creating an account, or if they want to change their default language on an existing account they can do so in their Edit profile page in the member area.

When they first visit your site or log out, they will then see your default language setting for the system.

On all themes we provide, enabling the user select language setting will display a drawdown selection on all pages of the site in the top right side of the web page. If you have a custom made theme and want to display the language selection, enter the following code in your top.php template file:

 
 <?php if ($allow_language=="True"){ ?>
 <span>
 <form method="post" action="index.php">
 <input type="hidden" name="action" value="selectlang">
 <select name="language" class="styled">
 <?=$lang_list?>
 </select><input type="submit" name="submit" value="<?=LANGSUBMIT?>">
 </form>   
 </span>                     
 <?php } ?>
 

Forcing a language on a link