Hello, thank you for using Babel, and of course MODX for your project.
I'd like to help you, since this issue always makes pain in the a$$ for most of newbies.
The problem gets more complicated after copy-pasting all different codes from all places the google lands them. Thus, I'll try to explain the internal work without sharing any code.
1. MODX detects language by using "cultureKey" value in $_REQUEST, $_SESSION, or the default option in System Settings (which can be overridden by Context Settings)
2. That's why in page load, .htaccess tries to redirect the page to another URL, just to give an identifier about which "cultureKey" it should be using.
3. Then Plugin (gateway for some said), captures that "cultureKey", then tries to load the related "context_key" to render the page content, which should have base_url or site_url setting that adds prefix the URL.
4. Well, you can add more required Context Settings, like: cultureKey, base_url, site_url, start_page, error_page, unauthorized_page, default_template, etc, which are always different to the other context(s).
Many users like to confuse between those settings, just keep this in mind: "
cultureKey" ≠ "
context_key".
You can have have multiple cultureKeys with one context_key (
Lingua), or multiple context_keys with only 1 (one) cultureKey.
I believe your kind of problem was a redirect loop because htaccess forwards (or does not forward) the page to a URL, then the Plugin forwards (or misses the identifier so repels) it back to another galaxy. Thus, you
trapped in time loop. ;p
So, actually what you need to do, is to read the combination codes between
htaccess and any
Plugin (or gateway, which gets more options from the Context Settings), and make them talk each other nicely.
I hope this helps.