News:

Want to get involved in developing SMF, then why not lend a hand on our github!

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.

Advertisement: