Name Name Posted April 27, 2012 Share Posted April 27, 2012 Hi, I need to support 3 differerent languages at my store. The language packs work just fine, but I've modified the header so that there's an extra navigation bar. I need to change the titles of the links at that navigation bar when the language changes. Any ideas? This is the code of the navigation bar. <div class="ui-widget-header infoBoxHeading" style=" height:40px; font-size:16px; border-radius:0px 0px 6px 6px;"><?php echo ' ' . $breadcrumb->trail(' » '); ?><div style="text-align:right;"><a href="account.php">Oma tili</a> » <a href="shopping_cart.php">Ostoskori</a> » <a href="checkout_shipping.php">Kassalle</a> » <a href="http://www.carcleaningcenter.fi/galleria">Kuvagalleria</a> » <?php if ( tep_session_is_registered('customer_id') ) { echo ' <a href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '">' . Uloskirjautuminen . '</a>'; } ?> http://angsti.net/TEST555/catalog/index.php I'm using osCommerce 2.3.1 Maydayerodima 1 Quote Link to comment Share on other sites More sharing options...
MrPhil Posted April 27, 2012 Share Posted April 27, 2012 I'm not sure what text you're asking about. When I switch to English, everything is in English except for the logo HIUKAN... and your breadcrumb trail (navigation links) at the lower right. For the breadcrumb trail, I would assume that the code should be the same as the top right breadcrumb trail, which does switch between languages. What did you do there different from the top? I would put them into a common function so that they always come out the same. A few suggestions on the breadcrumb (second navigation bar): Never, never, EVER hard code a non-ASCII character in a general code file. I'm talking about the double right guillemet >>. Use » instead (notice that the real breadcrumb uses that). If you ever change page character encoding, you'll be in deep trouble with those characters not displaying properly. Non-ASCII characters are OK only in a language file, where a specific character encoding is expected. Speaking of which, those links on the right aren't really a breadcrumb, so you should use something other than » to separate them. Using >> gives the impression that's a breadcrumb (a nested series of links) rather than separate top-level links. "|" (&vbar;) is commonly used for this purpose, as are various variants such as broken bars (¦) and double bars ||, and even bullets • and other symbols. You have an extra >> at the end of the list. People will be puzzled and look around for the next item. Consider putting this set of links on the same line as your real breadcrumb. It just looks odd being offset onto the next line. If you fear that the two of them together will be too wide to fit without wrapping around, I would suggest left-justifying the navigation links (under the real breadcrumb list). Name Name 1 Quote Link to comment Share on other sites More sharing options...
Name Name Posted April 28, 2012 Author Share Posted April 28, 2012 Thanks Phil, I think that when you looked at the file, I had already managed to change it using define(NAV_LINK_NAME', 'Content Switching when language changes'); in the language files and using <a href="link.php"><?php echo NAV_LINK_NAME; ?></a> in header. It works pretty well now. But then there's one thing. When I try to log in with swedish I get the following error messages: Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/u31272/public_html/TEST555/catalog/includes/languages/swedish/login.php:1) in /home/u31272/public_html/TEST555/catalog/includes/functions/sessions.php on line 102 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/u31272/public_html/TEST555/catalog/includes/languages/swedish/login.php:1) in /home/u31272/public_html/TEST555/catalog/includes/functions/sessions.php on line 102 Warning: Cannot modify header information - headers already sent by (output started at /home/u31272/public_html/TEST555/catalog/includes/languages/swedish/login.php:1) in /home/u31272/public_html/TEST555/catalog/includes/functions/general.php on line 45 I used this http://addons.oscommerce.com/info/7665/v,23 swedish language pack, I checked the files, but I cant find anything wrong. Quote Link to comment Share on other sites More sharing options...
Name Name Posted April 28, 2012 Author Share Posted April 28, 2012 And oh, I was just experimenting with the code in the header, and forgot to update the footer also :) Quote Link to comment Share on other sites More sharing options...
MrPhil Posted April 28, 2012 Share Posted April 28, 2012 Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/u31272/public_html/TEST555/catalog/includes/languages/swedish/login.php:1) in /home/u31272/public_html/TEST555/catalog/includes/functions/sessions.php on line 102 Take a look at swedish/login.php file. There is something on the first line that is outputting content to the browser, and shouldn't be. There could be a blank or tab before the opening <?php that you need to remove. If this is UTF-8, look for an unnecessary "Byte Order Mark" at the very beginning of the file. You will need to be out of UTF-8 mode in order to see it. Remove it. Quote Link to comment Share on other sites More sharing options...
Name Name Posted April 28, 2012 Author Share Posted April 28, 2012 The swedish login.php looks like this: <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ define('NAVBAR_TITLE', 'Logga in'); define('HEADING_TITLE', 'Välkommen, registrera dig här!'); define('HEADING_NEW_CUSTOMER', 'Ny kund'); define('TEXT_NEW_CUSTOMER', 'Jag är en ny kund.'); define('TEXT_NEW_CUSTOMER_INTRODUCTION', 'Genom att skapa ett konto hos ' . STORE_NAME . ' kommer du att kunna handla snabbare, vara uppdaterad om hur det går med din beställning, och hålla koll på de beställningar du gjort förut.'); define('HEADING_RETURNING_CUSTOMER', 'Återkommande kund'); define('TEXT_RETURNING_CUSTOMER', 'Jag är en återkommande kund.'); define('TEXT_PASSWORD_FORGOTTEN', 'Har du glömt lösenordet? Klicka här så skickar vi det via e-post.'); define('TEXT_LOGIN_ERROR', 'FELMEDDELANDE: Fel e-postadress och/eller lösenord.'); define('TEXT_VISITORS_CART', '<font color="#ff0000"><b>Obs:</b></font> Din "besöksvarukorgs" innehåll kommer att läggas ihop med din "medlemsvarukorgs" innehåll när du har loggat in. <a href="javascript:session_win();">[Mera info]</a>'); ?> And swedish.php like this: <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2007 osCommerce Released under the GNU General Public License */ // look in your $PATH_LOCALE/locale directory for available locales // or type locale -a on the server. // Examples: // on RedHat try 'en_US' // on FreeBSD try 'en_US.ISO_8859-1' // on Windows try 'en', or 'English' @setlocale(LC_TIME, 'sv_SE.ISO_8859-1'); define('DATE_FORMAT_SHORT', '%Y-%m-%d'); // this is used for strftime() define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime() define('DATE_FORMAT', 'Y-m-d'); // this is used for date() define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S'); define('JQUERY_DATEPICKER_I18N_CODE', ''); // leave empty for en_US; see http://jqueryui.com/demos/datepicker/#localization define('JQUERY_DATEPICKER_FORMAT', 'yy/mm/dd'); // see http://docs.jquery.com/UI/Datepicker/formatDate //// // Return date in raw format // $date should be in format mm/dd/yyyy // raw date is in format YYYYMMDD, or DDMMYYYY function tep_date_raw($date, $reverse = false) { if ($reverse) { return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4); } else { return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2); } } // if USE_DEFAULT_LANGUAGE_CURRENCY is true, use the following currency, instead of the applications default currency (used when changing language) define('LANGUAGE_CURRENCY', 'SEK'); // Global entries for the <html> tag define('HTML_PARAMS', 'dir="ltr" lang="sv"'); // charset for web pages and emails define('CHARSET', 'utf-8'); // page title define('TITLE', STORE_NAME); // header text in includes/header.php define('HEADER_TITLE_CREATE_ACCOUNT', 'Skapa ett konto'); define('HEADER_TITLE_MY_ACCOUNT', 'Mitt konto'); define('HEADER_TITLE_CART_CONTENTS', 'Varukorg'); define('HEADER_TITLE_CHECKOUT', 'Kassa'); define('HEADER_TITLE_TOP', 'Hem'); define('HEADER_TITLE_CATALOG', 'Katalog'); define('HEADER_TITLE_LOGOFF', 'Logga Ut'); define('HEADER_TITLE_LOGIN', 'Logga In'); define('NAV_TITLE_ACCOUNT55', 'Mitt konto | '); define('NAV_TITLE_BASKET55', 'Varukorg | '); define('NAV_TITLE_KASSA55', 'Kassa | '); define('NAV_TITLE_GALLERY55', 'Galleri | '); define('NAV_TITLE_LOGOUT55', 'Logga Ut'); define('NAV_TITLE_LOGIN55', 'Logga In'); // footer text in includes/footer.php define('FOOTER_TEXT_REQUESTS_SINCE', 'sidvisningar sedan'); // text for gender define('MALE', 'Man'); define('FEMALE', 'Kvinna'); define('MALE_ADDRESS', 'Herr.'); define('FEMALE_ADDRESS', 'Fru.'); // text for date of birth example define('DOB_FORMAT_STRING', 'yyyy-mm-dd'); // checkout procedure text define('CHECKOUT_BAR_DELIVERY', 'Leveransadress'); define('CHECKOUT_BAR_PAYMENT', 'Betalningssätt'); define('CHECKOUT_BAR_CONFIRMATION', 'Bekräftelse'); define('CHECKOUT_BAR_FINISHED', 'Klart!'); // pull down default text define('PULL_DOWN_DEFAULT', 'Välj'); define('TYPE_BELOW', 'Skriv nedan'); // javascript messages define('JS_ERROR', 'Fel finns i formuläret!\n Var vänlig rätta följande:\n\n'); define('JS_REVIEW_TEXT', '* The \'Recensionen\' måste bestå av minst ' . REVIEW_TEXT_MIN_LENGTH . ' tecken.\n'); define('JS_REVIEW_RATING', '* Du måste betygssätta produkten som du recenserar.\n'); define('JS_ERROR_NO_PAYMENT_MODULE_SELECTED', '* Välj betalningssätt.\n'); define('JS_ERROR_SUBMITTED', 'Formuläret är redan skickat. Tryck på OK och vänta på att processen är klar.'); define('ERROR_NO_PAYMENT_MODULE_SELECTED', 'Välj betalningssätt för din order.'); define('CATEGORY_COMPANY', 'Företagsuppgifter'); define('CATEGORY_PERSONAL', 'Personuppgifter'); define('CATEGORY_ADDRESS', 'Din adress'); define('CATEGORY_CONTACT', 'Dina kontaktinformationer'); define('CATEGORY_OPTIONS', 'Alternativ'); define('CATEGORY_PASSWORD', 'Ditt lösenord'); define('ENTRY_COMPANY', 'Företagets namn:'); define('ENTRY_COMPANY_TEXT', ''); define('ENTRY_GENDER', 'Kön:'); define('ENTRY_GENDER_ERROR', 'Välj kön.'); define('ENTRY_GENDER_TEXT', '*'); define('ENTRY_FIRST_NAME', 'Förnamn:'); define('ENTRY_FIRST_NAME_ERROR', 'Förnamnet måste bestå av minst ' . ENTRY_FIRST_NAME_MIN_LENGTH . ' tecken.'); define('ENTRY_FIRST_NAME_TEXT', '*'); define('ENTRY_LAST_NAME', 'Efternamn:'); define('ENTRY_LAST_NAME_ERROR', 'Efternamnet måste bestå av minst ' . ENTRY_LAST_NAME_MIN_LENGTH . ' tecken.'); define('ENTRY_LAST_NAME_TEXT', '*'); define('ENTRY_DATE_OF_BIRTH', 'Personnummer:'); define('ENTRY_DATE_OF_BIRTH_ERROR', 'Personnummret måste vara i formatet: MM/DD/YYYY (eg 05/21/1970)'); define('ENTRY_DATE_OF_BIRTH_TEXT', '* (eg. 05/21/1970)'); define('ENTRY_EMAIL_ADDRESS', 'E-postadress:'); define('ENTRY_EMAIL_ADDRESS_ERROR', 'Din E-postadressen måste bestå av minst ' . ENTRY_EMAIL_ADDRESS_MIN_LENGTH . ' tecken.'); define('ENTRY_EMAIL_ADDRESS_CHECK_ERROR', 'Din E-postadress verkar inte vara korrekt - kontrollera den igen.'); define('ENTRY_EMAIL_ADDRESS_ERROR_EXISTS', 'E-postadressen finns redan - logga in med den E-postadressen eller ange en annan E-postadress.'); define('ENTRY_EMAIL_ADDRESS_TEXT', '*'); define('ENTRY_STREET_ADDRESS', 'Gatuadress:'); define('ENTRY_STREET_ADDRESS_ERROR', 'Gatuadressen måste bestå av minst ' . ENTRY_STREET_ADDRESS_MIN_LENGTH . ' tecken.'); define('ENTRY_STREET_ADDRESS_TEXT', '*'); define('ENTRY_SUBURB', 'Förort:'); define('ENTRY_SUBURB_TEXT', ''); define('ENTRY_POST_CODE', 'Postnummer:'); define('ENTRY_POST_CODE_ERROR', 'Postnummret måste bestå av minst ' . ENTRY_POSTCODE_MIN_LENGTH . ' tecken.'); define('ENTRY_POST_CODE_TEXT', '*'); define('ENTRY_CITY', 'Postort:'); define('ENTRY_CITY_ERROR', 'Postorten måste bestå av minst ' . ENTRY_CITY_MIN_LENGTH . ' tecken.'); define('ENTRY_CITY_TEXT', '*'); define('ENTRY_STATE', 'Delstat:'); define('ENTRY_STATE_ERROR', 'Delstaten måste bestå av minst ' . ENTRY_STATE_MIN_LENGTH . ' tecken.'); define('ENTRY_STATE_ERROR_SELECT', 'Välj en delstat i dropdown menyn.'); define('ENTRY_STATE_TEXT', '*'); define('ENTRY_COUNTRY', 'Land:'); define('ENTRY_COUNTRY_ERROR', 'Välj land i dropdown menyn.'); define('ENTRY_COUNTRY_TEXT', '*'); define('ENTRY_TELEPHONE_NUMBER', 'Telefonnummer:'); define('ENTRY_TELEPHONE_NUMBER_ERROR', 'Telefonnummret måste bestå av minst ' . ENTRY_TELEPHONE_MIN_LENGTH . ' tecken.'); define('ENTRY_TELEPHONE_NUMBER_TEXT', '*'); define('ENTRY_FAX_NUMBER', 'Faxnummer:'); define('ENTRY_FAX_NUMBER_TEXT', ''); define('ENTRY_NEWSLETTER', 'Nyhetsbrev::'); define('ENTRY_NEWSLETTER_TEXT', ''); define('ENTRY_NEWSLETTER_YES', 'Prenumerera'); define('ENTRY_NEWSLETTER_NO', 'Avsluta prenumeration'); define('ENTRY_PASSWORD', 'Lösenord:'); define('ENTRY_PASSWORD_ERROR', 'Lösenordet måste bestå av minst ' . ENTRY_PASSWORD_MIN_LENGTH . ' tecken.'); define('ENTRY_PASSWORD_ERROR_NOT_MATCHING', 'Lösenordsbekräftelsen måste stämma överens med ditt lösenord.'); define('ENTRY_PASSWORD_TEXT', '*'); define('ENTRY_PASSWORD_CONFIRMATION', 'Bekräfta lösenordet:'); define('ENTRY_PASSWORD_CONFIRMATION_TEXT', '*'); define('ENTRY_PASSWORD_CURRENT', 'Nuvarande lösenord:'); define('ENTRY_PASSWORD_CURRENT_TEXT', '*'); define('ENTRY_PASSWORD_CURRENT_ERROR', 'Lösenordet måste bestå av minst ' . ENTRY_PASSWORD_MIN_LENGTH . ' tecken.'); define('ENTRY_PASSWORD_NEW', 'Nytt lösenord:'); define('ENTRY_PASSWORD_NEW_TEXT', '*'); define('ENTRY_PASSWORD_NEW_ERROR', 'Ditt nya lösenord måste bestå av minst ' . ENTRY_PASSWORD_MIN_LENGTH . ' tecken.'); define('ENTRY_PASSWORD_NEW_ERROR_NOT_MATCHING', 'Bekräftelsen av lösenordet måste stämma överens med ditt lösenord.'); define('PASSWORD_HIDDEN', '--DOLT--'); define('FORM_REQUIRED_INFORMATION', '* Obligatoriska uppgifter'); // constants for use in tep_prev_next_display function define('TEXT_RESULT_PAGE', 'Resultatsidor:'); define('TEXT_DISPLAY_NUMBER_OF_PRODUCTS', 'Visar <strong>%d</strong> till <strong>%d</strong> (av <strong>%d</strong> produkter)'); define('TEXT_DISPLAY_NUMBER_OF_ORDERS', 'Visar <strong>%d</strong> till <strong>%d</strong> (av <strong>%d</strong> ordrar)'); define('TEXT_DISPLAY_NUMBER_OF_REVIEWS', 'Visar <strong>%d</strong> till <strong>%d</strong> (av <strong>%d</strong> recensioner)'); define('TEXT_DISPLAY_NUMBER_OF_PRODUCTS_NEW', 'Visar <strong>%d</strong> till <strong>%d</strong> (av <strong>%d</strong> nya varor)'); define('TEXT_DISPLAY_NUMBER_OF_SPECIALS', 'Visar <strong>%d</strong> till <strong>%d</strong> (av <strong>%d</strong> specialerbjudanden)'); define('PREVNEXT_TITLE_FIRST_PAGE', 'Första sidan'); define('PREVNEXT_TITLE_PREVIOUS_PAGE', 'Förra sidan'); define('PREVNEXT_TITLE_NEXT_PAGE', 'Nästa sida'); define('PREVNEXT_TITLE_LAST_PAGE', 'Sista sidan'); define('PREVNEXT_TITLE_PAGE_NO', 'Sida %d'); define('PREVNEXT_TITLE_PREV_SET_OF_NO_PAGE', 'Föregående set av %d sidor'); define('PREVNEXT_TITLE_NEXT_SET_OF_NO_PAGE', 'Nästa set av %d sidor'); define('PREVNEXT_BUTTON_FIRST', '<<Första'); define('PREVNEXT_BUTTON_PREV', '[<< Föregående]'); define('PREVNEXT_BUTTON_NEXT', '[Nästa >>]'); define('PREVNEXT_BUTTON_LAST', 'Sista>>'); define('IMAGE_BUTTON_ADD_ADDRESS', 'Lägg till adress'); define('IMAGE_BUTTON_ADDRESS_BOOK', 'Adressbok'); define('IMAGE_BUTTON_BACK', 'Tillbaka'); define('IMAGE_BUTTON_BUY_NOW', 'Köp nu'); define('IMAGE_BUTTON_CHANGE_ADDRESS', 'Ändra adress'); define('IMAGE_BUTTON_CHECKOUT', 'Kassa'); define('IMAGE_BUTTON_CONFIRM_ORDER', 'Bekräfta order'); define('IMAGE_BUTTON_CONTINUE', 'Fortsätt'); define('IMAGE_BUTTON_CONTINUE_SHOPPING', 'Fortsätt handla'); define('IMAGE_BUTTON_DELETE', 'Ta bort'); define('IMAGE_BUTTON_EDIT_ACCOUNT', 'Redigera kontot'); define('IMAGE_BUTTON_HISTORY', 'Order historik'); define('IMAGE_BUTTON_LOGIN', 'Logga in'); define('IMAGE_BUTTON_IN_CART', 'Lägg till varukorgen'); define('IMAGE_BUTTON_NOTIFICATIONS', 'Notifieringar'); define('IMAGE_BUTTON_QUICK_FIND', 'Snabbsök'); define('IMAGE_BUTTON_REMOVE_NOTIFICATIONS', 'Ta bort notifieringar'); define('IMAGE_BUTTON_REVIEWS', 'Recensioner'); define('IMAGE_BUTTON_SEARCH', 'Sök'); define('IMAGE_BUTTON_SHIPPING_OPTIONS', 'Fraktsätt'); define('IMAGE_BUTTON_TELL_A_FRIEND', 'Tipsa en vän'); define('IMAGE_BUTTON_UPDATE', 'Uppdatera'); define('IMAGE_BUTTON_UPDATE_CART', 'Uppdatera varukorg'); define('IMAGE_BUTTON_WRITE_REVIEW', 'Skriv en recension'); define('SMALL_IMAGE_BUTTON_DELETE', 'Ta bort'); define('SMALL_IMAGE_BUTTON_EDIT', 'Redigera'); define('SMALL_IMAGE_BUTTON_VIEW', 'Visa'); define('ICON_ARROW_RIGHT', 'mer'); define('ICON_CART', 'I varukorgen'); define('ICON_ERROR', 'Fel'); define('ICON_SUCCESS', 'Lyckats'); define('ICON_WARNING', 'Varning'); define('TEXT_GREETING_PERSONAL', 'Välkommen tillbaka <span class="greetUser">%s!</span> Vill du se vilka <a href="%s"><u>nya produkter</u></a> som finns att köpa?'); define('TEXT_GREETING_PERSONAL_RELOGON', '<small>Om du inte är %s, please <a href="%s"><u>logga in</u></a> med dina kontouppgifter.</small>'); define('TEXT_GREETING_GUEST', 'Välkommen <span class="greetUser">Gäst!</span> Vill du <a href="%s"><u>logga in</u></a>? Eller vill du <a href="%s"><u>skapa ett nytt konto</u></a>?'); define('TEXT_SORT_PRODUCTS', 'Sortera produkter '); define('TEXT_DESCENDINGLY', 'nedåtstigande'); define('TEXT_ASCENDINGLY', 'uppåtstigande'); define('TEXT_BY', ' av '); define('TEXT_REVIEW_BY', 'av %s'); define('TEXT_REVIEW_WORD_COUNT', '%s ord'); define('TEXT_REVIEW_RATING', 'Betyg: %s [%s]'); define('TEXT_REVIEW_DATE_ADDED', 'Skrivet datum: %s'); define('TEXT_NO_REVIEWS', 'Det finns för tillfället inga recensioner.'); define('TEXT_NO_NEW_PRODUCTS', 'Det finns för tillfället inga produkter.'); define('TEXT_UNKNOWN_TAX_RATE', 'Okänd moms'); define('TEXT_REQUIRED', '<span class="errorText">Obligatoriskt/span>'); define('ERROR_TEP_MAIL', '<font face="Verdana, Arial" size="2" color="#ff0000"><strong><small>TEP ERROR:</small> Kan inte skicka e-post genom angiven SMTP-server. Kontrollera din php.ini inställning och ändra SMTP-server om det behövs.</strong></font>'); define('TEXT_CCVAL_ERROR_INVALID_DATE', 'Utgångsdatumet på ditt kreditkort har passerats.<br>Kontrollera datumet och försök igen.'); define('TEXT_CCVAL_ERROR_INVALID_NUMBER', 'Kreditkortsnummret du skrev in är ogiltigt.<br>Kontrollera nummret och försök igen.'); define('TEXT_CCVAL_ERROR_UNKNOWN_CARD', 'Dom 4 första siffrorna i nummret är: %s<br>Om det nummret är korrekt så accepterar vi inte den typen av kreditkort.<br>Om det är fel så försök igen.'); define('FOOTER_TEXT_BODY', 'Copyright © ' . date('Y') . ' <a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . STORE_NAME . '</a><br />Powered by <a href="http://www.oscommerce.com" target="_blank">osCommerce</a>'); ?> I also re-uploaded the sessions.php again. but didn't work. Quote Link to comment Share on other sites More sharing options...
MrPhil Posted April 29, 2012 Share Posted April 29, 2012 Make sure you are NOT in UTF-8 mode on your PC. Look carefully at the swedish/login.php file. You will find SOMETHING before the <?php, which should be removed. It may be a blank or tab, or a BOM. You also may be able to save the file in your editor, in UTF-8 mode, without Byte Order Mark (depends on the editor). Quote Link to comment Share on other sites More sharing options...
Name Name Posted April 29, 2012 Author Share Posted April 29, 2012 It was probably just some misspellings in the defines, I created a new swedish login.php from english login.php. Thanks for help :) Quote Link to comment Share on other sites More sharing options...
Name Name Posted April 29, 2012 Author Share Posted April 29, 2012 Or it didnt help.. It helped only in my local version of it... But I cant find any bytemarks? Quote Link to comment Share on other sites More sharing options...
MrPhil Posted April 29, 2012 Share Posted April 29, 2012 A Byte Order Mark is inserted into UTF-8 files by overly helpful (read: Microsoft) editors. It is xEF xBB xBF. When displayed in Latin-1, they are ï>¿ (where > is actually the » double guillemet >>). When the page comes up with the error that the headers can't be sent, use your browser's View > Character Encoding to switch to Latin-1. See if those three characters are in the very upper left of the page, before the error message. The BOM will be invisible if you are displaying or editing the page in UTF-8. The only other way to get the error is to have blanks/spaces/tabs before the <?php. Are you sure you're looking at the right file (/TEST555/catalog/includes/languages/swedish/login.php)? If you are editing files in UTF-8 mode, you must explicitly tell the editor to save WITHOUT Byte Order Mark. Any text before the <?php (BOM, blanks/spaces/tabs, error messages,...) is a problem because outside of <?php ... ?> you are in HTML mode. Anything found in HTML mode is sent directly to the browser and does not go through PHP interpretation. The very first character transmitted in a page triggers the server to flush its HTTP header information buffer first. If osC is not done updating the header information when this happens, you will get the "cannot send header information" error. Quote Link to comment Share on other sites More sharing options...
Name Name Posted April 30, 2012 Author Share Posted April 30, 2012 THANK YOU. It was just notepad++ bug or something, it said in the encoding tab Encode in UTF-8 without BOM, and it was selected, but it still didn't work. So I just clicked it again, saved, sent to my FTP server, and it works as a dream. Quote Link to comment Share on other sites More sharing options...
MrPhil Posted April 30, 2012 Share Posted April 30, 2012 Yea! Quote Link to comment Share on other sites More sharing options...
OSC-Sevilla Posted May 10, 2012 Share Posted May 10, 2012 This thread has saved my life! Awsome! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.