AtlasLang
AtlasLang is a production-grade multilingual engine designed for centralized language management across plugins and server components.
It provides strict validation, structured file handling, database-backed player language storage and full PlaceholderAPI integration.
GitHub Repository:
https://github.com/nauticstudios/atlaslang
Public API:
https://github.com/nauticstudios/AtlasLang/blob/master/src/main/java/com/github/nautic/api/AtlasAPI.java
Overview
Section titled “Overview”AtlasLang provides:
- Per-player language storage
- Locale → folder mapping system
- Strict language validation
- Recursive YAML file loading
- PlaceholderAPI expansion
- Public developer API
- GitHub synchronization
- Database persistence
- Runtime dependency loading
Architecture
Section titled “Architecture”Main Plugin (AtlasLang)
Section titled “Main Plugin (AtlasLang)”Responsible for:
- Runtime dependency loading
- Configuration initialization
- Language registration
- Command system
- Placeholder expansion registration
- GitHub sync management
- Database initialization
LanguageManager
Section titled “LanguageManager”Handles:
- Language registration
- Locale → folder mapping
- Default language fallback
- Strict resolution
- Reload logic
Configuration format:
default: english
register: languages: - en:english:messages.yml - es:spanish:messages.ymlFormat:
locale:folder:defaultFileFileManager
Section titled “FileManager”Responsible for:
- Recursive language folder loading
- YAML caching
- Dynamic file resolution
- Default file generation
- Cache clearing
Language directory:
/plugins/AtlasLang/languages/Example:
languages/ ├── english/ │ ├── messages.yml │ ├── scoreboard.yml │ └── system.yml └── spanish/ ├── messages.yml ├── scoreboard.yml └── system.ymlLangHandler
Section titled “LangHandler”Handles:
- Message retrieval
- String and list resolution
- Placeholder injection
- Fallback handling
- Missing path safety
If a path is invalid, a safe fallback message is returned.
Malformed or missing language files will never crash the server.
PlaceholderAPI Integration
Section titled “PlaceholderAPI Integration”Identifier:
%alang_...%Format:
%alang_(file)_(path)%Examples:
%alang_(messages)_(join_message)%%alang_(lobby:scoreboard)_(title)%Behavior:
- Resolves player language from database
- Falls back to default if invalid
- Validates file existence
- Validates path existence
Public Developer API
Section titled “Public Developer API”Static API access:
AtlasAPI.get(player, "path.to.message");AtlasAPI.get(uuid, "path.to.message");AtlasAPI.get("english", "path.to.message");With fallback:
AtlasAPI.getOrDefault(player, "path.to.message", "Fallback");Validation:
AtlasAPI.has("english", "path.to.message");AtlasAPI.isLanguageRegistered("english");Player language:
AtlasAPI.setLanguage(player, "english");AtlasAPI.getLanguage(player);Managers:
AtlasAPI.getLanguageManager();AtlasAPI.getLangHandler();Addon access:
AtlasAPI.getAddon(player, "path.to.message");Commands
Section titled “Commands”Base command:
/atlaslang| Command | Permission |
|---|---|
/atlaslang help | — |
/atlaslang list | atlaslang.list |
/atlaslang aliases | atlaslang.aliases |
/atlaslang set <player> <language> | atlaslang.set |
/atlaslang reset <player> | atlaslang.reset |
/atlaslang info <player> | atlaslang.info |
/atlaslang reload | atlaslang.reload |
/atlaslang github sync | atlaslang.github |
/atlaslang github status | atlaslang.github |
Full access:
atlaslang.adminGitHub Synchronization
Section titled “GitHub Synchronization”Supports automatic language sync from a repository.
Example:
github: repository: name: "owner/repository" branch: "main"
authentication: type: "none" token: ""
paths: remote-root: "languages" local-root: "languages"
sync: create-missing: true overwrite-existing: true delete-missing: false reload-after-sync: true- Runs asynchronously
- Does not block the main thread
- Supports optional token authentication
Database Integration
Section titled “Database Integration”Player language storage process:
- Retrieve stored language
- Validate registration
- Fallback to default if invalid
Database safely closes on plugin disable.
Runtime Dependency Loading
Section titled “Runtime Dependency Loading”Dependencies are loaded during onLoad() from:
- Maven Central
- CodeMC Repository
Libraries are relocated and isolated to prevent conflicts.
Language Resolution Flow
Section titled “Language Resolution Flow”- Player language requested
- LanguageManager resolves locale
- Folder validated
- FileManager loads file
- Path resolved
- Fallback applied if necessary
Strict validation prevents invalid states.
Designed For
Section titled “Designed For”- Multi-language networks
- Centralized language control
- Scoreboards
- GUIs and menus
- Placeholder-based systems
- Modular plugin ecosystems
Stability Guarantees
Section titled “Stability Guarantees”- No fatal errors for missing translations
- Strict language validation
- Safe fallback system
- Async GitHub sync
- Runtime-safe reload