Improve languages detection
This commit is contained in:
@@ -243,8 +243,8 @@ public class WhatAStorage {
|
|||||||
public String[] getLangs() {
|
public String[] getLangs() {
|
||||||
return contentManager.getResources("lang", "properties").map(resource -> {
|
return contentManager.getResources("lang", "properties").map(resource -> {
|
||||||
int index = resource.getId().lastIndexOf('.');
|
int index = resource.getId().lastIndexOf('.');
|
||||||
return resource.getId().substring(Math.max(index, 0));
|
return resource.getId().substring(Math.max(index + 1, 0));
|
||||||
}).toArray(String[]::new);
|
}).distinct().toArray(String[]::new);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user