News:

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

Main Menu

installing languages (newbie Q)

Started by brynn, March 21, 2013, 07:39:47 AM

Previous topic - Next topic

brynn

Hi Friends,
I've been reading the manual and FAQs that I've found about installing languages.  And also the UTF-8 faq too.  Of course the first step is easy enough (for me, with the forum version 2.04 with Tiny Portal).  I enter a language in Admin area > Languages > Add a Language.  So I enter Spanish, and I get 4 results:

Spanish es
Spanish es-utf8
Spanish Latin
Spanish Latin-utf8

How to decide which one or ones to install?  I know that I need one of the UTF-8 ones, but I don't understand the difference between Spanish es and Spanish Latin.  If I enter German, I need to choose between German and German informal.

So it seems likely that I'm going to run into different choices like this for other languages?  How do I decide which ones to use?  I only speak, read and write English, and I have little to no education about foreign languages.  (Well, I did study Spanish in high school and college both, but I still don't know the difference between "es" and "Latin"  :o)

Thanks for your help  :)

PS -- afterthought -- I wonder if "es" and "latin" identify the kind of Spanish spoken in Spain, vs the kind spoken in Mexico/Central America.  I do remember that there are 2 different dialects of Spanish, but I wouldn't know which is which.  Anyway, thanks again  :)

kat

If I was in your position, I'd ask my members. If I had Spanish/German members, I'd ask them which version they'd prefer.

Make sense?

Kindred

and yes...   es is spain-spanish and latin is latin-american spanish
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

MrPhil

As mentioned before, there is no one "Spanish", just like there is no one "English" language. Different countries and regions have their own dialects and forms of the Mother Tongue. In this case, Latin-American Spanish is considered different enough from Spain's Spanish to warrant being treated separately. In a similar vein, American English and British English are different enough to get separate treatment (spelling color vs colour, some grammatical forms "SMF has announced/SMF have announced").

As for the other half, it's the encoding. One is Latin-1/Western European/ISO-8859-1 (single byte) encoded, and the other is UTF-8 (multibyte characters for accented characters). They can't be mixed. Your entire forum must be one encoding (database, language support files, page display). In your case, your choice is between Latin-1 (the default) and UTF-8. If you will never support anything but English and Western European languages such as Spanish, either will do. If you might want to support non-Western languages at some point, you'll want to be in UTF-8 (it's the universal encoding). A further advantage of UTF-8 is that when some dolt cuts and pastes from a Word document, the "Smart Quotes" characters will usually be properly translated, rather than being left as control codes that mess up posts. This seems to usually work, but this behavior is not guaranteed, and depends on your specific operating system level and browser.

brynn

#4
Oh ok, I see!

I didn't know, if like in so many other areas, there are technical codes for this or that, and I thought there might be some key somewhere, so I wouldn't have to ask for every single language.  But I understand better now  :)

Edit
I had marked this topic solved, because my original question was resolved.  But now I have a related question, so I've unmarked it.  I hope that's not too uncool?

When I look at this FAQ for installing languages (http://wiki.simplemachines.org/smf/Languages_-_How_do_I_add_a_new_language) it's a little confusing.  There's a yellow rectangle that says "The following applies only to version 2.x"  So the yellow part instructs, apparently, how to install the languages (via link to online manual):
1 - type language name
2 - click Install for the version of that language that you want
3 - click Install on the next page that comes up (check or uncheck boxes first)

But those couple of clicks is all there was.  There was not even a moment's waiting for a download or an upload, or whatever it does.  So I have to wonder if the process is complete yet.

Below the yellow rectangle is some more text that says to extract something to your computer, and upload via FTP, and a whole other paragraph of instructions.  What's not clear to me is whether all I have to do is in the yellow rectangle (which means I'm done) or whether I need to continue on with the next paragraph (which means I have more work to do).  Or is everything under the yellow rectangle for previous versions?

When I look in the server, in the place where the FTP upload is supposed to go, the language files do seem to be already there.  So maybe I have completed the languages installation??

Thanks again for your help  :)

kat

Those language files are quite tiny. They'd upload in the blink of an eye, unless you're on dialup. Even then, it'd only take a few seconds. :)


brynn

Tiny?  Really?  Hhmmm.....well I certainly don't know anything about it on a technical level.  But it seems l like a language package would be huge.  But I'll take your word for it  :D

Thanks.  I think I'll leave this open for a little while longer, in case there are more comments.  But if it's clear I've gone through the proper process, please feel free to close it for me.  I will keep an eye on it though, either way.

Thanks again  :D

kat

All of the language files, on my site (English), take-up a total of 462 KB.

Tiny, weeny things. :)

Kindred

if the langauge files are present in yoru Themes/default/languages directory, then they were loaded correctly.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

brynn

Aah, ok.  So for example:  Errors.french - utf8.php?

Some things are so frustrating for me, and hard to understand, and when something goes so smoothly and quickly, I worry that I must have done it wrong, lol  :laugh:


Kindred

yup, exactly like that...   you should have a whole set of them index, errors, etc...

do note: especially with UTF-8, you may have to manually add the mod text strings into the modifications.yourlang-utf8.php
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

kat

Quote from: brynn on March 26, 2013, 09:24:18 AMSome things are so frustrating for me, and hard to understand, and when something goes so smoothly and quickly, I worry that I must have done it wrong, lol  :laugh:

Most of us were like that, when we started. ;)

brynn

Quote from: Kindred on March 26, 2013, 09:37:05 AM
yup, exactly like that...   you should have a whole set of them index, errors, etc...

do note: especially with UTF-8, you may have to manually add the mod text strings into the modifications.yourlang-utf8.php
Yes, I have all of them!

I'm afraid that I don't know what a "mod text string" is.  I think the only mod I have right now, is Tiny Portal.  But I don't see a modifications dir.

Kindred

no dir...

mods will add text strings into modifications.english.php and sometimes others...

If you did not have the language when you installed the mod, or the mod does not cover the language(s) that you have, then you will have to manually edit modifications.yourlang.php...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

MrPhil

And note that Modifications.swahili.php is a different file (for a different language [actually, alphabet]) than Modifications.swahili-utf8.php. The first case would usually be a single-byte encoding, while the second is UTF-8 multibyte encoding. In either case, it's unlikely that the mod has updated the file for you, so you will have to check, and manually edit it yourself. It's not uncommon for only "english" to be updated, not even "british-english" or "english-utf8".

brynn

Hhmmm....
So you're saying that if I want multiple languages for Tiny Portal, I'll need to manually add some kind of text string to modifications.each-language.php, and to modifications.each-language-utf8.php as well??

Also also, you mean that most mods will add the text strings to modifications.english.php, but not necessarily to modifications.english-utf8.php?

What is the text string?  And where do I add it?

Otherwise, the mods won't have multiple language support?

MrPhil

You would be using the same encoding in all cases, so it wouldn't be both modifications.swahili.php and modifications.swahili-utf8.php, because you wouldn't be using both. It might be modifications.french.php and modifications.german.php (both Latin-1) or it might be modifications.french-utf8.php and modifications.german-utf8.php (both UTF-8), but not both Latin-1 and UTF-8.

Most mods will do just 'english'. Some will do other languages. Maybe they'll do 'english-utf8' (instead) if they successfully detect that you're in UTF-8 mode (and maybe other UTF-8 languages). English is generally easy, because Latin-1 text = UTF-8 text = ASCII text (except when you get into using a few special characters such as Pound Sterling). Read the instructions carefully, and check the results carefully, to make sure the proper modifications.<language>.php file(s) get updated for your particular system. You may have to do the whole thing manually. Mod writers certainly aren't going to cover every possible language, and they may only do one encoding.

Arantor

QuoteMaybe they'll do 'english-utf8' (instead) if they successfully detect that you're in UTF-8 mode

Nope. There's no detection there for anything so clever. Properly written mods will have 'hey, I have edits for Modifications.english-utf8.php, does the file exist? If so, lemme do some edits, if not, never mind, onto the next thing'. (Badly written mods will get upset that a file they want to edit doesn't exist)

The same logic applies to every other mod install. In fact, there are a lot of mods with some interesting habits because you have multi-encoding mashed into a single .xml file and it's amazing we don't have more issues than we do with it all (mostly because the package manager is completely ignorant of encodings and just treats it as literal bytes to find/replace)

QuoteMod writers certainly aren't going to cover every possible language

Normally they do whatever languages people make the translations for. Some mods are more thoroughly covered than others. Some mods have never been translated out of English.

brynn

Ok, these last few messages are fairly confusing for me, at this point.  What I understand is that whatever mods I install after installing a non-English (or non-default) language, will automatically have the translations for that language.  But that if I install say 3 mods, and then later decide to install another language, I'll have to do something (add text string) to those 3 mods, so that it can use that language.  Have I got that right?

If that's correct, what text string do I add, and where do I add it (specificallly, in modification.that-language.php)?

Well....unless I'll find that info in the manual, when I'm looking to install mods.  If it's already in the manual, nevermind about answering -- hopefully I'll find that when I get to that place.  If that stuff is in the manual, we can close this topic now  :)

Thank you all for taking the time to offer comments and answer my questions  :D

Arantor

Quoteautomatically have the translations for that language

Maybe, maybe not. Not all mods have been translated. It will only include the translations if someone's translated it.

For example, there are a lot of mods that don't have an English-British translation added in.

QuoteIf that's correct, what text string do I add, and where do I add it (specificallly, in modification.that-language.php)?

That depends on the mod. Not all mods use Modifications.thatlanguage.php. As for what text string... if you're not fluent in that language, or you don't have moderators who are, you probably shouldn't be adding it anyway. (And if you do know the language, or have moderators who do, they can help you do the translation)

All you do is replicate the changes from Modifications.english.php (or any other .english.php file that the mod changes) into the other language's file, then change what it says.

For example, suppose a mod added:
$txt['mod_hello'] = 'Hello!';

to Modifications.english.php. And you had English-British installed but the mod didn't change it.

You'd then modify Modifications.english_british.php, and add:
$txt['mod_hello'] = 'Good day!';

or similar. You'd change the bit in quotes to represent the word or phrase in the other language but leave the bit on the left the same.

brynn

Ooohh, I'm starting to understand now.   I only need to change whatever text that mod happens to display.  I don't understand much about programming, or how websites work, or how mods work.  I had in my mind that the code for the entire mods, and even the entire website had to be translated before it would work.  But I guess the same code is used by everyone, no matter what language they read, write or speak.  The code itself needs no translation, does it?  It's just what needs to be displayed for the website visitors or admins that hass to be translated.

Well OK!  :)  (  :-[ Maybe I should start putting NEWBIE all in caps for the next few weeks!  :P  :P )

I hope my forum will be an international forum, so I've installed what I think of as the traditional, most used languages.  But if someone who speaks a less common language wants to join, then I'll need to install that language, after all the mods are installed, and then go and change those little bits of text, like you said.

Thank you all very  much for your help!  It's much appreciated  :D

Arantor

QuoteIt's just what needs to be displayed for the website visitors or admins that hass to be translated.

Yup.

QuoteBut if someone who speaks a less common language wants to join, then I'll need to install that language

Not really recommended. People are happiest in their own language, sure, but that means they're going to post in their own language - and unless you have moderators who can speak that language, it's really just asking for trouble because they could be posting all kinds of things and you would have no idea what they're doing.

MrPhil

Quote from: Arantor on March 30, 2013, 08:02:12 PM
QuoteBut if someone who speaks a less common language wants to join, then I'll need to install that language

Not really recommended. People are happiest in their own language, sure, but that means they're going to post in their own language - and unless you have moderators who can speak that language, it's really just asking for trouble because they could be posting all kinds of things and you would have no idea what they're doing.

Two issues there with "supporting" a "less common" language:

  • One thing you want is to achieve a critical mass of users in a given language. No one wants to talk to themselves all day long. If they post in Estonian and no one ever replies, they'll get discouraged and drift away. I would tally up specific requests for a given language support before taking the plunge (line up a moderator too).
  • If you don't have a moderator fluent in that language, it doesn't have to be a total mystery what they're posting, but it will take a lot more work. You would need to cut and paste mystery language posts into Google Translate and at least check if they're spamming or flaming or doing something forbidden. I seem to recall that there are some in-place pushbutton translation tools, but you may have to pay for that service now.
You'll notice that even SMF restricts non-English use to a specific board for a language, rather than permitting posts all over the place in random languages. There's no problem with allowing a selection of any language for prompts and labels, but give some thought about where you want to allow non-primary language postings in your forum.

brynn

You mean it doesn't translate the messages? 

Why would you want the forum displayed in a different language, let's say French, if someone posts a message in French, that doesn't get translated, so that people who use the forum in Spanish can read it in Spanish?

Is there some kind of mod that will translate the messages? 

(PS - the new default theme today is cute, but more appropriate for children, imo.  I changed my theme back to the previous default, but I still have smileys from the "cartoon theme".  Oh, maybe I can change them from my cp??  I'll check right after I post this {smiley here})

kat

Think of just how big a database could be, if it had to store entire language dictionaries...

Think of how slow your site would be, if it was forever translating everything.

Nightmare.

There is a way, though... (For Opera users, at least)

https://addons.opera.com/en-gb/extensions/details/in-place-translator

Oldiesmann

There are two different mods you can use - Quick Translation or Google Translate for SMF 2.0. Google's translations aren't always perfect, but that's about as close as you'll get to what you want.
Michael Eshom
Christian Metal Fans

Arantor

Not to mention how inaccurate it would be to have automatic translation - Google Translate frequently gets things incorrect.

As for storing it, if you imagine that SMF supports upwards of 50 languages, that would mean you'd have to handle 50x the content.

Chalky

An English friend of mine had a Spanish boyfriend and neither spoke the other's language, so they used Google translator to communicate.  Dodgy translations were responsible for a lot of misunderstandings and they nearly broke up over a translation a couple of times because neither realised that it was the translation that was bad rather than what the other had said.  Each time it took a human translator (me) to set them straight.  Imagine the fun that kind of thing could cause on a forum  ;)

kat

That's true of all couples.

Women speak in a strange language that us mere males have never been able to understand...

MrPhil

Quote from: Sabrinova on April 01, 2013, 01:01:00 PM
An English friend of mine had a Spanish boyfriend and neither spoke the other's language, so they used Google translator to communicate.  Dodgy translations were responsible for a lot of misunderstandings and they nearly broke up over a translation a couple of times because neither realised that it was the translation that was bad rather than what the other had said.
Is his name Manuel and is he from Barcelona? I think Basil is hunting for him... something about cleaning the dead pigeons out of the water tank.

Chalky

Quote from: MrPhil on April 01, 2013, 02:30:56 PM
Is his name Manuel and is he from Barcelona? I think Basil is hunting for him... something about cleaning the dead pigeons out of the water tank.

¿Qué?  :laugh:


brynn

Well of course I have very little understanding of programming, or how big or slow a certain kind program might be.  I actually wouldn't mind a slow page load/display, if the translation was appropriate.

Oh, I've seen that Google mod in use, and I would never use it.  At least not until google fixes its product, which mixes up words and phrases.  It seems to translate everything properly, but then throws in some apparently random organization of the words and phrases.  But I'll have a look at the other one. 

I don't use Opera, so that translator won't work for me....and also, not many of my forum members would be using it either.

But thanks for the info.  I'm disappointed, but I may well find forum members who could handle various languages.  The forum will provide support for Inkscape, an open source vector graphics editor, which is used all over the world.

It's a little hard to understand how 2 people could fall in love if they don't speak the same language, at least a little bit.  Add such a distance that they have to use the internet to communicate, makes it seem even less likely of being successful.  But by using that google product, I'd say it's impossible.  And yes, communication between the sexes can be difficult.  Men often seem less willing to make an effort to communicate, and those who do usually blame it on woman {lol}

And btw, I suspect the creator of April Fools day was a man.  Probably had poor communication skills. {roll eyes}  But that's what this new default theme and smileys are about today, right?

Well anyway, many sincere thanks to everyone who's offered comments and suggestions.  It's all much appreciated, and I've learned a lot.

All best :-)

brynn

Oh oops, I do have 1 more question.  I wonder if there would be any translation software for a price, that might work better than the 2 mods mentioned here?  I'd at least like to learn more about them, maybe look at a trial version or something??

Arantor

I sincerely doubt it. Given how many (very highly qualified) people work at Google, what they have is about the best there is right now.

Certainly nothing you can run on your own server.

Kindred

getting accurate translations is actually big business (they charge big bucks) and requires a HUMAN to parse it. They have not made anything in machine code that even comes close to the accuracy required for real translations.

This is why SMF uses a human (and amazing) translation team and why we have support boards in the various languages.
Translating a fixed string is a one-time thing (which is why we have all the language packs that we have) but even that still requires a human to do it accurately.
Translating a user's post would be next to impossible... especially considering the poor grammar, terrible spelling and use of idiomatic expressions.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

brynn

Ok, I understand everything I need to understand for now :)

Thanks again everyone!

MrPhil

Google Translate explained:

1. http://www.toptenz.net/top-10-controversial-books.php  Number 8, English as She Is Spoke

2. Monty Python's Flying Circus Dirty Hungarian Phrasebook Sketch: www.youtube.com/watch?v=G6D1YI-41ao

Advertisement: