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:
A common question that arises, is the legality of downloading a show that is not licensed or has not been released in the United States (or wherever the person may reside) yet. Although this matter is less and less of a concern for new shows thanks to streaming efforts through Hulu, Crunchyroll and other services, it is a common response from many fans of a show that they have no other means of watching it short of importing the DVDs or blu-rays from Japan (which may or may not have subtitles, let alone a dub).
The fact of the matter is however that even if a show is not licensed for release in the United States it is still protected in the United States. Several international treaties exist between nations that afford creators in one country protection of their works and rights in another. These conventions include the Berne convention, UCC Geneva, UCC Paris, TRIPS and WCT. Both Japan and the United States are signatories on all five of these agreements. Without going into the specifics of each treaty, this generally means that anime, made and produced in Japan but not yet released in the United States is STILL protected by United States code.
What fans may not be aware of, that by distributing an anime title in the United States that has not been licensed they are potentially violating the copyright of several other related companies. Anime frequently involves several sponsorships in order to fund a project. These company logos and product placements are subject to copyright or trademark protection as well and the display of their products or symbols violates intellectual property law. Thus, although one might stream an episode of Code Geass thinking that the only company they have to worry about is Bandai, Pizza Hut may in fact file an action for the use of their logo without permission. Tiger & Bunny is chock full of advertisements from Pepsi to Amazon all of whom have rights in their trademarks and images that may be infringed when displaying the original work. This is additionally true for music which can often be a separate license when a show features a musical artist who is using the series to promote their band or latest single which is often why many videos on YouTube of an anime have their audio removed by YouTube when the artist request as such. These licensing agreements can even affect a domestic distribution as was the case with Funimation's release of Haré+Guu which lacked the ending song ohashi by Eri Umihara.
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.