1
chardiar
E-mails, printer, pdf: What to change to switch to spanish characters?
  • 2006/6/19 16:01

  • chardiar

  • Just popping in

  • Posts: 91

  • Since: 2004/8/16


Hi to all,

I have only this little problem with language in e-mails, printer and pdf.

This is an example:

Última modificación: 2005/8/18 16:35:50

That should say:

Última modificación: 2005/8/18 16:35:50


I have in my XOOPS site, in file /language/spanish/global.php the line

define('_CHARSET', 'ISO-8859-1');

to

define('_CHARSET', 'utf-8');


xoops version 2.2.4

What is it wrong?

Thanks in advance .

2
snow77
Re: E-mails, printer, pdf: What to change to switch to spanish?
  • 2006/6/19 16:07

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


I've had lots of problems with the spanish language in UTF format, I solved this having all language file in ISO-8859-1 format
www.polymorphee.com
www.xoopsdesign.com

3
chardiar
Re: E-mails, printer, pdf: What to change to switch to spanish?
  • 2006/6/19 16:22

  • chardiar

  • Just popping in

  • Posts: 91

  • Since: 2004/8/16


Quote:

snow77 wrote:
I've had lots of problems with the spanish language in UTF format, I solved this having all language file in ISO-8859-1 format


Thanks for your answer snow77.

But if I have .../language/spanish/global.php the line

define('_CHARSET', 'ISO-8859-1');

I have problems in the whole site

4
snow77
Re: E-mails, printer, pdf: What to change to switch to spanish?
  • 2006/6/19 16:47

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


if you downloaded the unicode spanish pack from xoops.org it has the language files for the core, the sytem module and other modules... they are all in UTF-8 charset....but wait let me explain

look what happened to me...I had some old spanish lang pack by Horacio.. but the files had some missing lang strings... this was all in charset ISO-8859-1... I dowloaded de unicode utf-8 one from xoops.org, followed the instructions and all the lang messed up in my site; because, as I understood things, I couldn't switch to UTF when all previous things were already in ISO.

So the solution for me was to transform all the language files found in the unicode spansh lang version found here (cause they seemed to have more complete lang strings) to ISO charset.

To just switch the encoding in the global.php file doesn't work, all other files need to be encoded the same way. So I guess if you have a site with content and you started with UTF all your spanish lang files need to be in UTF, if you started with ISO then all have to be ISO.

What spanish pack do you have your site functioning with?
www.polymorphee.com
www.xoopsdesign.com

5
rowdie
Re: E-mails, printer, pdf: What to change to switch to spanish?
  • 2006/6/19 17:27

  • rowdie

  • Just can't stay away

  • Posts: 846

  • Since: 2004/7/21


To fix the emails you need to have a file called 'xoopsmailerlocal.php' in your language folder, which sets the language code to 'UTF-8' for emails.

So first make a file called 'xoopsmailerlocal.php' in your /language/spanish/ folder.

Then copy/paste the following code into that file:


<?php

class XoopsMailerLocal extends XoopsMailer {

        function 
XoopsMailerLocal(){
                
$this->XoopsMailer();
                
$this->charSet 'utf-8';
        }
}
?>


Make sure there are no blank spaces or empty lines before the '<' or after the '?>'

That should set your emails to use UTF-8 encoding.

PDFs and print views are different for each module, it's not a core functionality. Which modules are you having trouble with, maybe someone here has a solution for you?

6
chardiar
Re: E-mails, printer, pdf: What to change to switch to spanish?
  • 2006/6/19 22:23

  • chardiar

  • Just popping in

  • Posts: 91

  • Since: 2004/8/16


Hi rowdie,

Thanks very much! Now, e-mails problem it's solved .


The modules with problems are:

- extcal in printer.
- News in printer, send a friend and pdf.
- catads in printer.
- jobs in printer.
- userpage in printer, send a friend and pdf.
- smartfaq in printer.

You can see them at www.guiadelfrio.com

can anybody help me with this?

7
snow77
Re: E-mails, printer, pdf: What to change to switch to spanish?
  • 2006/6/19 22:33

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


If you are using UTF-8 character encoding...then maybe you need the lang files for these modules under UTF-8 encoding. But I am not completely sure but you can test with one module if it works this way.

Like I said before..if you had content already setup under ISO charset... and then if you you suddenly switch to UTF... older content will all be messed up; you can't make these kind of switches when a site is already with content. If all has been UTF since the beginning then having all lang files found inside each module with the UTF charset should fix your problem.
www.polymorphee.com
www.xoopsdesign.com

8
chardiar
Re: E-mails, printer, pdf: What to change to switch to spanish?
  • 2006/6/20 14:58

  • chardiar

  • Just popping in

  • Posts: 91

  • Since: 2004/8/16


Hi snow77,

I don't understand good. My English it's bad.

I had content already setup under ISO charset. When I saw that characters were bad then I changed to utf-8 and that solved, but not pdf and printer.

Please, can you say me -step by step- what I must make to solve this problem?

9
snow77
Re: E-mails, printer, pdf: What to change to switch to spanish?
  • 2006/6/20 16:26

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


chardiar, send me an email at info[at]xoopdesign.com and I'll try to help you in spanish, I can't assure you 100% that the problem will be fixed but I can try, because I work with ISO but still I can take a look.

- envíame en un zip la carpeta 'language' de cada uno de los módulos que te causan problema así en una sola carpeta :

modules/jobs/language
./catads/language
./news/language
www.polymorphee.com
www.xoopsdesign.com

10
snow77
Re: E-mails, printer, pdf: What to change to switch to spanish?
  • 2006/6/21 4:59

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


I analyzed what you sent me, apparently the language of your modules are in ISO format and you are using UTF format.

I see this for example in one of language strings for news in UTF format (which is the spanish language pack I downloaded from xoops.org):

Quote:
define('_MI_NEWS_NAME', 'Artículos');


and in the file you sent me I see:

Quote:
define('_MI_NEWS_NAME','Artículos');


To make a small test I will send you a zip with whole UTF language version of just the news module...put it in your site leaving a backup of your original folder just in case something real bad happens you restore the folder you had before. Let me know if this fixes the news module part.

Also it would be good if you could contact riosoft and see how he usually manages the spanish language settings, he is in charge of Proyecto EÑE which you can see if you click HERE

UTF just makes handling the language more complicated, it seems to me , but I'm sure there is a fix to your problem. If the news gets fixed this way, the next step would be to do the same with the rest of the modules.
www.polymorphee.com
www.xoopsdesign.com

Login

Who's Online

162 user(s) are online (91 user(s) are browsing Support Forums)


Members: 0


Guests: 162


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits