Site maintenance: Sun 15 Nov, from 12:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / Addon Language Packs / Font size differ English default but swedish is too big size of fonts

Font size differ English default but swedish is too big size of fonts

Started by stefanl on 7 Jan 2012, 6:07 PM · Views: 5,590

Results 1 to 15 of 15
7 Jan 2012, 6:07 PM
#1
stefanl avatar

stefanl

Zen Follower

Join Date:
Aug 2009
Location:
SWEDEN
Posts:
198
Plugin Contributions:
0

Font size differ English default but swedish is too big size of fonts

I upgraded to zencart 150.
I installed the Swedish language package.
When I in the online catalogue check the shop, the english font size is okey, but the swedish language font size is way to big.

How and which file/admin do I change to the same font size as english?

Link to my shop is https://www.canvas.nu/shop

link to Swedish language pack. add-on: http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=1948

Thanks in advance
Stefan

7 Jan 2012, 11:33 PM
#2
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Re: Font size differ English default but swedish is too big size of fonts

Hi Stefan there is an error on your swedish page that is causing this problem.

Look at the generated pages source code in your browser and you will see some gibberish appearing before the HTML doctype declaration, when i remove this gibberish your font sizes on the swedish page appear the same as the english version

swedish page

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="sv"> <head>

English Page

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en"> <head>

I have not a clue what is causing this, it could be anything from a corrupt file to the wrong type of encoding, someone with a few more braincells should be able to help you out

Webzings Design
Semi retired from Web Design

8 Jan 2012, 10:19 AM
#3
stefanl avatar

stefanl

Zen Follower

Join Date:
Aug 2009
Location:
SWEDEN
Posts:
198
Plugin Contributions:
0

Re: Font size differ English default but swedish is too big size of fonts

Hello there,

Great catch!
No brainsells?, LOL, I probably have LESS brainsells than you have.
Most appreciated to your findings!

And again Thanks!

Internet is fantastic, nothing new, but you sit in New Zeeland and I in Sweden. Two oposite end of the world countries helping out each others.

Now just have to find out which swedish code page to look for. I will run them through Notepad++/ WinMerge and see if I find them.

Stefan

9 Jan 2012, 1:11 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Font size differ English default but swedish is too big size of fonts

Looks like BOM headers in your files. They are invisible to you when viewing the file in your text editor.

When using UTF8 you need to save ALL your files WITHOUT BOM. That's a setting in your text editor's preferences.

BOM = byte order mark

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

9 Jan 2012, 8:37 AM
#5
stefanl avatar

stefanl

Zen Follower

Join Date:
Aug 2009
Location:
SWEDEN
Posts:
198
Plugin Contributions:
0

Re: Font size differ English default but swedish is too big size of fonts

Hi Dr Byte,

Huge thanks for always being here to help out.

If I get it right, you mean the Swedish language files in the Swedish language pack (donloaded from https://www.zen-cart.com free add-ons) have been using UTF 8 with BOM?

Does this mean I will have to re-save the programers files?

If this is the case I will send the programer an email so he see this information as well.

Your thoughts?

9 Jan 2012, 9:38 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Font size differ English default but swedish is too big size of fonts

I haven't inspected that addon myself. I simply stated what I think might be the problem. Test it for yourself by re-saving the files without BOM. Then decide what you wish to do after that.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

9 Jan 2012, 9:51 AM
#7
stefanl avatar

stefanl

Zen Follower

Join Date:
Aug 2009
Location:
SWEDEN
Posts:
198
Plugin Contributions:
0

Re: Font size differ English default but swedish is too big size of fonts

Hi,

I just an email from the person who made the add-on. He told he had used "your" files and edited them. WOuldnt know where to look.
Do you have a small hint, suspicion on where to look, part from resaving all as non UTF8?

Personally I dont know where to start or even now how to save with or without UTF8. Its new to me.

Is that done in Notepad++ or in the FTP program?

Thanks as always
Stefan

9 Jan 2012, 9:54 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Font size differ English default but swedish is too big size of fonts

Use Notepad++ to edit and save each of the files from the language pack. Tell Notepad++ to Save as UTF8-without-BOM.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

9 Jan 2012, 11:07 AM
#9
stefanl avatar

stefanl

Zen Follower

Join Date:
Aug 2009
Location:
SWEDEN
Posts:
198
Plugin Contributions:
0

Re: Font size differ English default but swedish is too big size of fonts

Hi DrByte,

Okidoki, will do.
Only there is quite many files in each language folder in admin/include/languages and in the include/languages.
Havent started to count them yet. Is it ALL those files or just a few specific files?

Thanks for the great support on this issue!
Stefan

9 Jan 2012, 1:00 PM
#10
stefanl avatar

stefanl

Zen Follower

Join Date:
Aug 2009
Location:
SWEDEN
Posts:
198
Plugin Contributions:
0

Re: Font size differ English default but swedish is too big size of fonts

I only tried to save one to UTF8 Bom as you said, but was also suggested to look on the page and I used Firefox & Google Chrome, Firebug & Google equivalent. In Firfox I could clearly see the gibberish signs.

I also saw that it doesnt seem to be define pages but the language files.

Now my knowledge is limited, but I did make two screenshots showing the issue in action so to speak. See attached link

http://www.canvas.nu/zencart_test.html

Thanks as always
Stefan

9 Jan 2012, 6:29 PM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Font size differ English default but swedish is too big size of fonts

As I said before, the "gibberish" in the top left corner of the page is probably BOM. And for that you need to fix all your language files.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

16 Feb 2012, 10:40 AM
#12
auto325 avatar

auto325

New Zenner

Join Date:
Feb 2012
Posts:
3
Plugin Contributions:
0

Re: Font size differ English default but swedish is too big size of fonts

Any update? I have the same issue. Bigger font in local language. I changed from ANSI local files to UTF-8 (save as in notepad) the diacritics (no wrong characters on web page) is OK after that but font size is bigger.

16 Feb 2012, 10:43 AM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Font size differ English default but swedish is too big size of fonts

Same answer.
If there is output sent to the browser before the HTML and stylesheet are called, it may cause the page to display incorrectly. And the only thing that causes such output is incorrect file-encoding or actual errors in your templates or PHP code.

And in the future, when you post, please answer all the questions in the Posting Tips section of the "Reply" or "New Thread" page. They're presented plainly on the page for a reason.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

16 Feb 2012, 9:51 PM
#14
auto325 avatar

auto325

New Zenner

Join Date:
Feb 2012
Posts:
3
Plugin Contributions:
0

Re: Font size differ English default but swedish is too big size of fonts

Zencart 1.5
installed via FTP
localized from the old version 1.3 and here was the problem I think.
I started from scratch now copied En files as new local language, translated few words in local version through Notepad++ with UTF8 without BOM and all looks well now. The text size and diacritics is OK!!!

Only starting with localization from scratch and have question here.
Already localized includes\languages\local.php and I see translation on the web correctly

translated part of another file under includes\languages\local\header.php (to see header translated)
switched to local language and web header (Home) is still in English, what could be wrong?

16 Feb 2012, 9:59 PM
#15
auto325 avatar

auto325

New Zenner

Join Date:
Feb 2012
Posts:
3
Plugin Contributions:
0

Re: Font size differ English default but swedish is too big size of fonts

I see now that I only didnt see the header translated under the Classic templated, switched to another template I had installed the header is translated correctly. All size and diacritics is OK, only cannot see the header translated in the main template. Maybe you can explain why. Appreciate your help.