GetSimple Support Forum

Full Version: Problem with testing new language
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi.
When im testing new language, there is a problem. Its unable to add or update pages.

Warning: Cannot modify header information - headers already sent by (output started at /home/...../public_html/getsimple/admin/lang/pl_PL.php:1) in /home/...../public_html/getsimple/admin/inc/changedata.php on line 134

when i change back to english, works fine.

thx for help
Then my guess is that there is a problem with your PL lang file... can you attach it here so I can look at it?
You welcome
Actually I also experience some malfunction testing russian language file. To be more precise:

- No redirect from admin authorization form in index.php (the form remains without any error message)


...maybe I found a problem. Its utf-8... try to convert english language in utf-8 and see the result Sad
Ok i found a problem.
Source language code is ANSI. But should be UTF-8
When i change my translantion to ANSI works well but in panel polish signs looks like ��
So i think is source code of translation should be in UTF-8

Look at screen
Yes - I think this is the case too, would probably eliminate doing the ascii encodings Smile
Of course it should be utf-8... but where is the problem? Anyone knows why it happens?
Do you think it was in the way I originally saved my EN language file? The things you learn when developing an application...
kotos Wrote:When i change my translantion to ANSI works well but in panel polish signs looks like ��

If you have AddDefaultCharset UTF-8 in .htaccess it should also work in ANSI. Open PL file in notepad++ and convert to ANSI (from utf), then save and check the result... verified now and it works fine without ��.

See the attachment
Thanks vsky - you've been a ton of help debugging these utf-8 problems... something that I am completely new at. By the way: AddDefaultCharset UTF-8 is added automatically in the new 1.6 install. Unfortunately, if you were just upgrading, then your existing .htaccess file wouldn't have it.

so is this the fix here?
1. Make sure you save the lang file in UTF-8
2. Have AddDefaultCharset UTF-8 in the .htaccess file
Ok, so i just tried this... and saving the file as UTF-8 only causes problems, but I am with vsky in wondering why... it seems as thought it can still read the file because I still get all my translations even though up top I have the error message:
Code:
Warning: Cannot modify header information - headers already sent by (output started at /home/content/c/c/a/ccagle8/html/images/gs/admin/lang/en_US.php:1) in
ccagle8 Wrote:1. Make sure you save the lang file in UTF-8
Unfortunately if you do so then admin redirection wont work properly (from index.php to pages.php)... and I have no idea why...
Tomorrow I'll try to encode some system files as utf-8 to see the difference

ccagle8 Wrote:2. Have AddDefaultCharset UTF-8 in the .htaccess file
In this case, even if your language file is ansi, it will be read as "ansi as utf-8"
i just found the problem: http://us3.php.net/manual/en/function.header.php#81971

i tried to save some system files as UTF-8 instead of ANSI and they all gave the error messages - not just the lang file. I think maybe the best bet here is the encode the lang files and save them as ANSI.
Redirection problem SOLVED

If you are going to use UTF-8 encodings to your language file you MUST choose to save "UTF-8 without BOM".

Actually the UTF-8 encoding added three characters at the start of a file : ο»Ώ. This is called BOM in UTF-8.

PS. by the way... "ANSI as UTF-8" is the same thing as "UTF-8 without BOM" Smile
haha, i just read that too a couple posts down on the PHP forum - you beat me to it!! haha. Thanks VSKY!!
Ok i save on utf-8 without bom and works well.
Thank you for advice
Hello, I'm new on this forum and I'm also from Poland.
And I've got nearly the same problem - I've saved the language file as a UTF-8 without BOM and it's working a litlle bit better, but still there is a problem.
When I want to open a page in Admin Mode, for the first time after loging in, it goes wrong. There is a lot of some chars like this: "Ustawienia gĹ�Ăłwne " in stead of "Ustawienia główne". When I refresh the page it turns in to right coding.

Is there any solution? Could you help me?
Thanks in advance!
I wonder if this has to do with a page being cached by your browser. Either clear your browser or use a different one (maybe IE, because who uses this as their default browser anyway???!?!)

I haven't seen this so hopefully it's just a cache thing
It could also be the server serving a cached page. It resetting your browsers cache doesn't work, then restart Apache (or equivalent) to clear the servers php cache extensions. I have to do this all the time with WordPress.
Hello!
So, I've cleaned browsers cache files, but it didn't help. I've wrote to my hosting firm, with request to restart my apache server.
But it wasn't the problem. The problem was in meta tag describing charset, when opening admin control panel.
The file responsible for <head> section is header.php in admin/template/
Now it is:
Code:
<meta http-equiv="Content-Type" value="text/html; charset=utf-8" />
and it should be:
Code:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

After this change everything works fine.
@merlin_mag - very interesting. I can't believe we haven't seen this as a problem until now. Thank you for finding this, and I will check it in as an update in version 2.0.
No problem. Smile

It's pleasure for me to work with such a smart, simple and really nice CMS! Get Simple - rulez.
I'm waiting for the next version.