[MAGNOLIA-3314] i18n and multisite, different fallback and default Created: 06/Oct/10 Updated: 04/Nov/15 Resolved: 04/Nov/15 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | i18n |
| Affects Version/s: | 4.3.2, 4.3.6 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Andrea Castelli | Assignee: | Unassigned |
| Resolution: | Won't Do | Votes: | 2 |
| Labels: | fallbackDefault, i18n, multisite | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows Vista, Windows 7 |
||
| Attachments: |
|
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Date of First Response: |
| Description |
|
From the mailing list: I noticed a strange behaviour with Magnolia 4.3.2 and 4.3.6. I configured for a site of the STK BUT at this point when I switch to english an error 404 is returned. So: I verified this beahviour also in the demosite, with different combination of locales. Also did you enter any english content? Default site content (i.e. the one w/o locale suffix when viewed in JCR browser) was mapped to english, so changing default locale to italian, all the default content would show as italian instead of english and there would be no english content anywhere). Can you provide also listing of available locales (the locales subnode) and export (or screnshot) of content in question as seen in JCR browser? ---------------------------- |
| Comments |
| Comment by Sven Damm [ 27/Jun/13 ] |
|
I stumbled across the following lines in AbstractI18nContentSupport.determineLocale() if(locale.equals(getFallbackLocale())){
locale = getDefaultLocale();
}
and this did not make sense to me. So I searched and came here. Now it makes sense: it does not work since a long time. I removed the lines |
| Comment by Sven Damm [ 27/Jun/13 ] |
|
I noticed two more problems with this function: |
| Comment by Sven Damm [ 27/Jun/13 ] |
|
My solution: @Override
protected Locale onDetermineLocale() {
final String i18nURI = MgnlContext.getAggregationState().getCurrentURI();
String localeStr = StringUtils.substringBetween(i18nURI, "/", "/");
if (localeStr == null)
return null;
if (localeStr.length() == 2 && Character.isLowerCase(localeStr.charAt(0)) && Character.isLowerCase(localeStr.charAt(1)))
return new Locale(localeStr);
return null;
}
|
| Comment by Michael Mühlebach [ 04/Nov/15 ] |
|
Given the thousands of other issues we have open that are more highly requested, we won't be able to address this issue in the foreseeable future. Instead we will focus on issues with a higher impact, and more votes. |