I know that fan-translated scans and scanned official pages are illegal when a manga is released in English, but I was never sure what the rules were if the manga hasn't been released in English. What are the general rules about legality of fan-translations and translations in general for manga going from Japanese to English (or any other language that there are different/specific rules)?
This is a matter of international copyright law, and as such is fairly complicated and depends on where you live. However, for most of the developed world the laws are fairly standardized and so, if you're willing to paint with broad brush-strokes and ignore technical nuances, the laws are all pretty universal.
Most countries in the world are parties to trade agreements and copyright agreements. The most famous of these is the Berne Convention, but there are many others. Without getting into too many technical details, what these agreements mean is that countries will respect each other's copyright and intellectual property to some degree. There are certain exemptions, such as fair use, but scanalations definitely don't fit any of these.
Japan is a partner to most countries in such agreements. That means that Japanese IP rights-holders can typically file suit against people infringing on their rights even in other countries. Alternatively, one could think about it that Japanese works also retain certain legal protections overseas, so that e.g. a U.S. manga scanalator would still be breaking the law. These laws are typically pretty broad and include a lot of different artistic media (e.g. anime) and other works which are under the protection of IP law. So, for all practical purposes, if you're distributing or obtaining copies of manga which are not officially licensed, you're probably breaking the law.
Licensing status doesn't have any legal bearing on the copyright status. Licensing is a separate issue of whether other companies may create and distribute the work (usually overseas). An unlicensed work is still probably protected under international law though. However, there are practical issues related to the cost of undergoing such legal proceedings and the fan backlash that make legal action unlikely, especially in the case of unlicensed series where the rights-holder typically has little to gain financially. This story can change drastically when more parties (e.g. sponsors) are involved.
Anime News Network has a good introductory sequence of articles about legal aspects of anime. Of course, there are practical differences between anime and manga. Specifically, anime producers usually have both greater ability and interest in protecting their IP than manga producers. However, at least at the basic level, there's essentially no legal difference between the protections afforded to the two. Here's what they have to say about fansubbing in cases like this:
I'll also point out that while fansubbers and scanalators are almost certainly legally in the wrong, the number of cases related to this is quite small. There are several reasons for this. For one, the Japanese industry is built to sell merchandise in Japan, so they have little interest in prosecuting cases overseas. The licensing industry, on the other hand, was built around an already extant culture of fansubbing, and so they've always just factored that in.
The bigger reason this doesn't happen is probably that the backlash that would occur against a licensing organization which did this is probably more costly than whatever they stand to gain. Even the backlash against Funimation for joking about suing fansub downloaders was pretty significant, and I doubt they're really interested in repeating that again. Legally speaking though, they would probably be within their rights to do so.
This is a pretty straightforward issue. If you live in a country that is a signatory to the Berne Convention (which is most countries), you are required to respect Japanese copyright law (and likewise, Japanese people are required to respect your country's copyright law).
Japanese copyright law (like most copyright law) forbids the unauthorized reproduction of copyrighted works,1 which is an integral part of any scanlation. As such, any scanlator who has not obtained permission from the copyright holder of a manga before scanlating it is in violation of Japanese copyright law.2 The fact that the manga has not been released in English is immaterial.
There are exceptions to copyright, of course, but none of them are really applicable to the issue of scanlation. Fair use, in particular, is not a defense - the wholesale copying of the entirety of a copyrighted would never be considered "fair use" by a court.
(Of course, whether or not scanlation is ethical is a separate question altogether.)
1 See, for example, articles 21 and 49 of the Copyright Act (official English translation).
2 This answer does not address works that have lapsed into the public domain. There is no legal barrier to scanlating public domain works. The problem is that Japanese law (Copyright Act, article 51) specifies that works lapse into the public domain 50 years after the death of the author, and nobody today is scanlating manga drawn by people who died before 1963. So, for practical purposes, public domain doesn't really enter into the whole scanlation issue.