File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
src/main/java/org/j1sk1ss/menuframework/common Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 8
8
import java .util .ArrayList ;
9
9
10
10
11
+ /**
12
+ * Localization manager based on CordellDB
13
+ * Main idea, that every MenuWindow will have own CDB for translation
14
+ * For creation a new localization file you will need:
15
+ * - Every line of file - one component
16
+ * - Key and value in CordellDB separated by ":"
17
+ * - Key should have LNG_ prefix. Also key should copy name of component for localization
18
+ * - Example: EN_button1:ButtonName/ButtonLore
19
+ * - Example: EN_panel:InventoryName/-
20
+ * - Example: IT_button1:ButtonNome/ButtonStoria
21
+ * - Example: RU_button1:Кнопка/- (- means saving lore (Or name))
22
+ * Then just get panel with lang (from prefix), and show it for player:
23
+ * - Example: windowMenu.getPanel("panel1", "RU").getView(player);
24
+ * Notes:
25
+ * - Avoid localization for panels
26
+ * - Remember that MenuFramework don`t know player`s native language. You should detect this by yourself.
27
+ */
11
28
public class LocalizationManager {
12
29
public LocalizationManager (String localization ) {
13
30
LocManager = new Manager (localization );
You can’t perform that action at this time.
0 commit comments