News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

A probem with language packs in 2.X

Started by Anub1s, July 07, 2008, 05:27:50 AM

Previous topic - Next topic

Anub1s

i am new to the forum sppecific side of SMF as i used to just install and leave it to its own devices. now i am using SMF for the company i now work for and they love it.

BUT the company i work for all there staff are italian so i have to use the italian language pack (and put it in english for myself)

The problem i am getting is the following simbles come up as ? or a box depending what brouser is used :'( èéàòù

Now i tryed converting the language pack into UFT-8 with note pad. may i say this was a compleat disaster as i had to re install the forum :'( massive cashing error :'(

now when i installed the forum i had the language pack already uploaded and installed in italian aswell but still i get the ? or the Box. even with the database set to UFT-8 i get these problems (I am sutch a noob).

anyway my question is is theer a solution for this or am i stuck in a rut and not able to move anywere.

what i will say is i am able to eddit once told what i ahve to do (one advantage of ADHD i retain information very easaly but need explaining first lol)

Anyway sorry to boar the poo out of you all with this.

Ciao Ciao

Anthony

metallica48423

This will probably be a tricky one -- is your database in utf8 as well?  i'm going to point someone with more experience in charsets/languages in here
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

Anub1s

thank you and yes my database has always been set to UTF-8, see i think its the language pack itself. and can not think what the hell is wrong with it.

anyway thanks again.

Anub1s

tatore

#3
Ciao, Antonio.
I would ask you a couple of (maybe silly) things, since I've translated some italian-utf8 language file for my test-site (smf2-b3.1 public).
Did you rename files, after translation to whatever.italian-utf8.php ?
In several parts of the -utf8 language files it's clear the comment:
Quote// Use numeric entities in the below string.
So, instead of
Quote$txt['are_sure_remove_topic'] = 'Si è certi di voler eliminare questa discussione?';
we need to use
$txt['are_sure_remove_topic'] = 'Si & #232; certi di voler eliminare questa discussione?';
Did you use, as comments suggested, numeric entities?

*Salvo*




Quote from: RumbaarI wont jump to conclusion, but you might be hacked?

Sarge

Anub1s, you need to (among other things):

1) Save files as UTF-8 without BOM (Byte Order Mark). For example, Notepad++ and BabelPad allow this:
http://www.simplemachines.org/community/index.php?topic=220015.msg1424932#msg1424932

2) Be sure to use decimal numeric HTML entities instead of normal characters, for example è instead of è, where specified. Do not use named entities like è for those strings.

On the other hand, there are $txt strings that should have characters instead of entities.

For strings that need special care (as mentioned above), there should be a comment in the language file, like "// Use numeric entities in the three below strings" or "Use international characters directly here" and similar.

I'm leaving for about 3 days, but I can try to give you more specific info when I come back. Please try 1) and 2) above and let us know. :)

[edit]
Tatore was faster! :D

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

tatore

*Salvo*




Quote from: RumbaarI wont jump to conclusion, but you might be hacked?

Anub1s

#6
the language files i have are off the smf website language section.

i did resave the files as uft-8 in vista notpad :D

and no i havent as i am a noob. i am not a propper programmer :'( i only eddit :'(

Now my questions are what are the codes for the caractures then :D

and if i brake my forum again will somone els reinstall it for me please as i will cry.

i will pay for charter membership if i can get this working aswell :D.

put it through as expences :P


tatore

Quote from: Anub1s on July 08, 2008, 05:52:59 AM
the language files i have are off the smf website language section.

i did resave the files as uft-8 in vista notpad :D

and no i havent as i am a noob. i am not a propper programmer :'( i only eddit :'(


AHA  ;) Che mi combini?
That's why maybe you gave up with the utf-8 languages and even the forum broken..
You simply hadn't the -utf8.php final extension.
Don't give up.
*Salvo*




Quote from: RumbaarI wont jump to conclusion, but you might be hacked?

Anub1s

grasi amico

i will do that and try again fr4esh install this time lol.

i hope this time it works lol

Anub1s

ok i have done this i saved the files to be utf-8 i put -utf8.php at the end i even eddited the index page to say

// Locale (strftime, pspell_new) and spelling. (pspell_new, can be left as '' normally.)
// For more information see:
//   - http://www.php.net/function.pspell-new
//   - http://www.php.net/function.setlocale
// Again, SPELLING SHOULD BE '' 99% OF THE TIME!!  Please read this!
$txt['lang_locale'] = 'it-IT.utf8';
$txt['lang_dictionary'] = 'it-IT';
$txt['lang_spelling'] = 'italian';

// Character set and right to left?
$txt['lang_character_set'] = 'UTF-8';
$txt['lang_rtl'] = false;


and i am getting this error :'(

QuoteFatal error: require() [function.require]: Failed opening required '/hidden/forum/Themes/default/languages/index.italian.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in hidden/forum/Sources/ManageServer.php on line 1193

Any idea :'(

tatore

Did you  change from Admin cp/Server settings>>>>Default Forum language>>italian utf8 [save] ??
Do you have the all files in utf8 or just Index.italian-utf8.php ?
*Salvo*




Quote from: RumbaarI wont jump to conclusion, but you might be hacked?

Anub1s

all files i have in utf8 and its in the admin section when i click on italian it desides to do that :'(

Anub1s

// Quickly load index language entries.
$old_txt = $txt;
require($settings['default_theme_dir'] . '/languages/index.' . $context['lang_id'] . '.php');
$context['lang_file_not_writable_message'] = is_writable($settings['default_theme_dir'] . '/languages/index.' . $context['lang_id'] . '.php') ? '' : sprintf($txt['lang_file_not_writable'], $settings['default_theme_dir'] . '/languages/index.' . $context['lang_id'] . '.php');


here is where the problem is BUT i would have to change the file dirrectorys for the english files aswell so that it will work OMG i am going to cry

tatore

*Salvo*




Quote from: RumbaarI wont jump to conclusion, but you might be hacked?

metallica48423

wait... tatore = santa claus?

Thanks for looking at it guys :).

* metallica48423 really needs to learn about charsets :P
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

AlenNS

I have a problem with serbian language pack, also from admin panel downloaded.

When I use it, I get this problem with letters.

My database is set to UTF-8.

Anub1s

Dude you are a saint this has realy helped may i add you both to my buddy list.

i hope i can make myself more compitant with smf and maybe some day make some mods for this fantastic program :D

anub1s

tatore

Very glad that it heped you.
It's a chain: Sarge helped me in the past, now I paid my due helping somebodyelse  :P
*Salvo*




Quote from: RumbaarI wont jump to conclusion, but you might be hacked?

AlenNS

What about my problem?
Is there any help?
:(

Sarge

Quote from: AlenNS on July 10, 2008, 11:57:09 AM
I have a problem with serbian language pack, also from admin panel downloaded.

When I use it, I get this problem with letters.
My database is set to UTF-8.

Did you download and select the serbian pack or the serbian-utf8 pack? Your forum seems to be in UTF-8, so you need the -utf8 language pack.

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

Advertisement: