Zen Cart Logo
Forums / Addon Language Packs / Spanish Language Pack (complete and UTF8) for Zen Cart 1.39b

Spanish Language Pack (complete and UTF8) for Zen Cart 1.39b

Views: 72,179

Results 41 to 60 of 134
7 Sep 2010, 1:33 PM
#41
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,872
Plugin Contributions:
7

Spanish Language Pack (complete and UTF8) for Zen Cart 1.39b

I am not sure where those missing items are coming from, got a screenshot or site to look at?

9 Sep 2010, 1:02 AM
#42
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Spanish Language Pack (complete and UTF8) for Zen Cart 1.39b

Torvista,

I am not sure how to upload a screenshot, but here is an example of the text that is appearing on my Spanish login page:

¿No está registrado? Puede hacerlo aquí
BILLING_INFO_TEXT

Clientes registrados: Entrar en su cuenta
RETURN_CUSTOMER_TEXT
HEADING_RETURNING_INFO E-mail:

HEADING_SHOP_CONFIDENCE
SHOP_CONFIDENCE_TEXT
HEADING_CUSTOMER_SERVICE

* Envío y devoluciones
* Contáctenos

BUTTON_IMAGE_CAPTCHA_REDRAW_ALT
TITLE_CAPTCHA TEXT_CAPTCHA

This also occurs on my main page for the Authorize.net sidebox, which at the top says BOX_HEADING_AUTHORIZENET.

I do know how to attach a screenshot to an email. If that would help, I will try to email the screenshot(s) to you. At the moment they are saved as .png files.

I may be able to locate these with the developer's toolbox and fix one-by-one, but wanted to see if the headings were due to some install step I missed. Thanks.

Notageek

9 Sep 2010, 2:53 AM
#43
drbyte avatar

drbyte

Sensei

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

Re: Spanish Language Pack (complete and UTF8) for Zen Cart 1.39b

Those UPPERCASE_THINGS are called constants. They are placeholders for the text that would normally appear in those spots. Those constants are defined using "define" statements in language files.
When you're seeing the constants showing up instead of the text that should be in their place, then that means you're missing one or more files from your server that would normally contain those definitions, or you've just plain skipped defining them.

Find the files that you skipped uploading (or which failed to upload fully), and upload them to your site, and the problem will go away.
Same issue as described here: https://www.zen-cart.com/tutorials/index.php?article=95

9 Sep 2010, 8:42 PM
#44
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,872
Plugin Contributions:
7

Re: Spanish Language Pack (complete and UTF8) for Zen Cart 1.39b

Are you using a template you have added to zen cart?
ie You have not copied "classic" and created your own template using "classic" as a base?

10 Sep 2010, 7:56 PM
#45
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Spanish Language Pack (complete and UTF8) for Zen Cart 1.39b

Torvista,

I am using Clyde Jones' Zencart_Zen template.

Notageek

11 Sep 2010, 8:39 AM
#46
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,872
Plugin Contributions:
7

Re: Spanish Language Pack (complete and UTF8) for Zen Cart 1.39b

Do a file compare on the english language files included in your template and those of the default zen cart, I think there are extra language defines used in your template. These will not have spanish equivalents defined- you'll have to add those yourself in the corresponding files.

15 Sep 2010, 1:02 PM
#47
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Spanish Language Pack (complete and UTF8) for Zen Cart 1.39b

Pursuant to the comments of Dr. Byte and Torvista:

  1. I checked out the reference/tutorial on Constants, and then searched for them in the Developer's Toolkit, but the toolkit seemed to ignore such language and returned no results. For example, a search for "BILLING_INFO_TEXT" under "All language files for ENGLISH - Catalog/Admin" results in:

Error: No matching Configuration Keys were found ... BILLING_INFO_TEXT

  1. I compared the includes/languages/english.php default with the includes/languages/MYTEMPLATE/english.php, made the changes to includes/languages/spanish.php using Google Translate, and saved to includes/languages/MYTEMPLATE/spanish.php.

Since the Developer's Toolbox is not returning files for Constants, it looks like I will need to compare the includes/languages/english.php for each module I added with my includes/languages/MYTEMPLATE/english.php file, one-by-one, and add the Spanish translations where needed.

  1. I obtained translations from Google Translate, and they are exact translations in the spanish.php file. However, the ? is replacing letters in the translated text on the login page. For example, on the Login page I see the following text:

Para crear una cuenta, por favor, introduzca sus datos de facturaci?n y como aparece en su tarjeta de cr?dito.

los titulares de cuentas: Por favor Entrar a continuaci?n.

mi?rcoles 15 septiembre, 2010

I did change over my cart to UTF8 by the SQL export, search and replace latin1 with UTF8, and import changed SQL file into PHPMyAdmin.

I'm not sure how to troubleshoot the stray ? problem. The spanish.php file does not contain the stray characters.

  1. I see that some of my products have text in both the Spanish and English product boxes, but others do not. I am guessing this might be due to my having added certain products through Easy Populate after installing the Spanish language module, but I am not sure.

Does Easy Populate automatically place product descriptions in both the Spanish and English boxes, or is there a particular technique for getting the text into both the Spanish and English boxes for product descriptions?

Thanks for any comments.

Notageek

15 Sep 2010, 1:34 PM
#48
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,872
Plugin Contributions:
7

Re: Spanish Language Pack (complete and UTF8) for Zen Cart 1.39b

  1. I assume in spanish.php you have defined setlocale for spanish
@setlocale(LC_TIME, 'es_ES.UTF8');//for unix
@setlocale(LC_TIME, 'Spanish_Spain.1252');//for windows

and the webpage encoding to utf-8

// charset for web pages and emails
define('CHARSET', 'utf-8');

and
the encoding of the spanish.php (and all spanish language files) itself is utf-8 not ANSI.

  1. in your browser, if you change the page encoding from utf8 to ISO 8859 do the missing characters appear with the correct accents?

if 1) yes and 2)no, have you uploaded this to your hosting server to see if the problem is the same there?

I assume you are developing on windows and hosting on linux - I could never get the php-generated-text-with-accents (the days and months) to display correctly on windows but on linux yes.

16 Sep 2010, 1:33 PM
#49
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Spanish Language Pack (complete and UTF8) for Zen Cart 1.39b

Torvista,

In substituting ISO_8859-1 for utf-8 for the email and web page, the ? goes away, but of course I get such things as "¿Olvidó su contraseña?" on my Windows environment WAMP server.

Looking at the includes/languages/spanish.php text more carefully, I see that it shows the coding for the accents:

define('BOX_GV_REDEEM_INFO', 'Código del cupón de descuento: ');

On the other hand, Google Translator text must be in ANSI; in my HTML editor, it has the correct appearance rather than being in the code for the accented letters, whereas the correctly coded text not in ANSI appears correctly.

Therefore, it renders with question marks on the Zen Cart login page:

"Por favor Entrar a continuaci?n" versus "Dirección Línea 2:"

and

". . . su tarjeta de cr?dito." versus Teléfono:

Where the HTML editor says:

"Para crear una cuenta, por favor, introduzca sus datos de facturación y como aparece en su tarjeta de crédito.

the login page says:

"Para crear una cuenta, por favor, introduzca sus datos de facturaci�n y como aparece en su tarjeta de cr�dito."

So I am going to guess that the text from Google Translator that appears correctly in the html editor is showing the accented characters in ANSI in the HTML editor.

If correct, I need to search for a method to translate Google Translate ANSI letters into letters with accents and apply that process to any further translations I attempt.

If the above is correct, would you have a recommendation as to the best way to translate the ANSI letters into the code which shows correctly on the web page?

I hope I have stated the above clearly.

Thanks for your help.

16 Sep 2010, 2:25 PM
#50
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,872
Plugin Contributions:
7

Re: Spanish Language Pack (complete and UTF8) for Zen Cart 1.39b

  1. Looking at the includes/languages/spanish.php text more carefully, I see..

(I assume from the path you have given, you are not using an override of the language file, it is in this location and not actually in .../languages/YOUR_TEMPLATE/spanish.php)

What TEXT editor are you using to look at these language files?

I use notepad++ which shows the encoding of the file at the bottom of the screen - it is important that this is utf-8 (without BOM) not ANSI.
If it is utf-8, then the accented characters should be represented correctly with no strange characters, if they are not, re-type them so they are correct.

If the file is not utf-8 (without BOM), then ctrl-X everything, change the encoding to utf-8 and paste it back into the file.
Correct any wrong characters.

Now how does it look?

17 Sep 2010, 4:30 PM
#51
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Spanish Language Pack (complete and UTF8) for Zen Cart 1.39b

Torvista,

Thanks for pointing out my omission of the override in identifying the spanish.php directory. My active spanish.php file is indeed in includes/languages/MYTEMPLATE/spanish.php.

I use a free HTML editor, Coffee Cup, for lots of php file editing because it is pretty user friendly, sometimes lets me see a preview, and will save a file that is already in .php, although it does not give me that election in the "save as" bottom-of-file box.

I also use Notepad++, generally for editing .sql or Excel files. I checked on the web how to save in utf-8 because I do not have that option at the bottom in a "save as" format, and came upon the following which applies to my version of Notepad++:

When I go to:

File
Save as
Save as type ---- It shows many file types but not "UTF-8 without BOM"

To me it appears there are two areas you need to select "UTF-8 without BOM" being:

  1. Click on "Format"

Select "Encode in UTF-8 without BOM"

  1. Click on "settings"

Click on "Preferences"
Click on "new document/open save directory"
Select "UTF-8 without BOM"

I made the above 2 changes from the "Format" and "Settings" tabs in the header location. I opened a fresh spanish.php file from includes/languages/MYTEMPLATE/spanish.php, and re-saved, but got the ? in place of o and e with accents.

I searched the web for some sort of chart of characters with accents, but found nothing so far, so I copied some accents in the spanish.php file, from the words Información and términos, so the verbiage from my Zencart_Zen template is changed thus:

Para crear una cuenta, por favor, introduzca sus datos de facturación y como aparece en su tarjeta de crédito.

and

Por favor Entrar a continuación.

It now renders correctly.

So it appears that if I use a translator such as Google Translate, I will need to somehow locate a source of code for the accented letters and replace those one-by-one, or morpheme-by-morpheme (e.g., cion = ción).

Is there some term I should be searching for that would help me discover a chart of such accent codes?

Or am I on the wrong track?

Thanks.

Notageek

17 Sep 2010, 10:02 PM
#52
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,872
Plugin Contributions:
7

Re: Spanish Language Pack (complete and UTF8) for Zen Cart 1.39b

Notepad++
Although it shows the encoding in use at the bottom of the page, there is no "save as." option related to encoding.
Encoding changes are done via
Encoding->Encode in UTF-8 without BOM.

I think your questions about encoding are not really necessary, I have not had so many problems getting it to work.

These are my checksteps:

  1. the file is now encoded as utf-8 as indicated in notepad++.

  2. the offending phrase is written correctly in the file with the accents and no odd characters.

To be completely idiot-proof regarding overrides, I put a marker in the offending phrase, like "here" at the start, to have no doubt the file I have open is the one providing the text I have a problem with.

  1. View the page in the browser and check the encoding as delivered to the browser is utf-8: this should be in the head section
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

If the characters are still corrupted, then I don't know, and someone else needs to input something here.
(I have deliberately not mentioned the connection to the database requires defining as utf-8 as I don't think it matters in relation to the language defines.)

17 Sep 2010, 11:48 PM
#53
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Spanish Language Pack (complete and UTF8) for Zen Cart 1.39b

Torvista,

I read your response as saying "crédito" should look like "crédito" in Notepad++.

However, those odd codes are in every place where there should be an accented letter in my override file.

I asked myself: Have I changed things by saving spanish.php from Coffee Cup which is an HTML editor?

That appears possible. I checked the default file which is the original spanish.php file, and it has the correct appearance you describe, with no odd codes.

So, I recreated my override file in Notepad++.

My "? in lieu of accented letter" problems disappeared and all text renders correctly now. The web page source code reads utf-8.

I so much appreciate your helping me to work this out.

If I discover the remedy to the box_heading problem, I will let you know.

Notageek

18 Sep 2010, 3:29 AM
#54
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,872
Plugin Contributions:
7

Re: Spanish Language Pack (complete and UTF8) for Zen Cart 1.39b

If you have a file that looks correct (Notepad++) and change the encoding, you will see the accented characters change and you`ll have to retype/correct them.
If however you copy or cut all the text, then change the encoding, then paste the text back it, it will all look the same but be in the new encoding, requiring no changes on your part.

So, if there is any other characters being rendered incorrectly, it must be the encoding of that particular language file.

Regarding your BOX_HEADING, if there are CONSTANT_NAMES being shown instead of text, then there is no spanish language defined for that CONSTANT_NAME.

You need to search (I use Windows GREP) for that constant define (assuming an english one exists) and create a spanish equivalent, ensuring that the source file is utf-8.

As everyone who replies here, the hope is that you only have to describe a solution once, then its there for anyone else.

24 Sep 2010, 11:19 AM
#55
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Spanish Language Pack (complete and UTF8) for Zen Cart 1.39b

I have had no success using GREP or the Developer's Tool Kit to find terms on my WAMP test site. My searches continually find nothing, and searching on the bottom box in the Developer's Tool Kit times out.

I did solve the BOX_HEADING problem by copying all the files from the following directories to the corresponding spanish directory and translating those files:

includes/languages/english/extra_definitions/MYTEMPLATE/

includes/languages/english/extra_definitions

includes/languages/english/MYTEMPLATE

I copied language from the templates provided with the Spanish Language Pack where I could, and used Google Translate for the material unique to my site.

Since Notepad++ defaults to ANSI, many times I had to redo files and cut and save again in UTF-8 without BOM, but in the end the Login page is fine and the box headings are correct, and the cut and re-paste procedure works when question marks turn up in the text.

I hope this update is helpful.

Notageek

24 Sep 2010, 11:47 AM
#56
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Spanish Language Pack (complete and UTF8) for Zen Cart 1.39b

Hi. I'm seeing a ? wherever an accented letter should appear in my category names.

Does anyone know where or how to correct this? My PHPMyAdmin lists the names correctly in the categories_description table.

Thanks for any suggestions.

Notageek

24 Sep 2010, 12:45 PM
#57
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,872
Plugin Contributions:
7

Re: Spanish Language Pack (complete and UTF8) for Zen Cart 1.39b

The category name as stored in the database is not the same, or not being passed as the same charset as that expected by the browser.

  1. Just to be sure, you HAVE defined the db_charset as utf-8 as explained here..?
    http://www.zen-cart.com/forum/showthread.php?t=153582

  2. If 1) is in place, does the category name appear corrupted in the admin?

  3. when you edit the category name in the admin and save it, does the problem remain?

  4. in phpmyadmin - select the database - what collation are the tables?

24 Sep 2010, 10:11 PM
#58
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Spanish Language Pack (complete and UTF8) for Zen Cart 1.39b

Torvista,

I created the /includes/extra_configures/my_db_charset.php and admin/includes/extra_configures/my_db_charset.php files as instructed in the link above, and wrote in utf8 as the character set.

This solved my category name problems which now show the accents correctly.

Your help has been indispensable and wonderful. Thank you.

Notageek

24 Sep 2010, 10:35 PM
#59
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Spanish Language Pack (complete and UTF8) for Zen Cart 1.39b

Just a footnote, I spoke too soon being happy that the accented letters displayed correctly in my category list. However, on checking the Admin, they did display with the odd characters and I did need to delete those and replace them with new translations. At that point, the Admin was also correct.

My tables are in utf8 collation.

Thanks.

Notageek

24 Sep 2010, 10:48 PM
#60
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,872
Plugin Contributions:
7

Re: Spanish Language Pack (complete and UTF8) for Zen Cart 1.39b

since you had not changed the charset previously, you will probably find everything accented will require re-entering..

glad you got it sorted in the end,
regards
Steve