Microsphere Projects for Internationalisation
The Microsphere Internationalisation project is a comprehensive internationalization (i18n) framework designed for Java applications, with particular emphasis on Spring-based ecosystems. It provides a modular, extensible architecture for managing localized messages across different deployment scenarios, from standalone applications to distributed cloud-native systems.
The Microsphere Internationalisation project extends Spring Cloud Internationalisation with enhanced features including:
- Message Source Hierarchy: The system provides a flexible hierarchy of message sources that can load localized content
from various sources including properties files, Spring's
Environment, and external configuration systems. TheServiceMessageSourceinterface serves as the primary abstraction, with specialized implementations for different resource types. - Composite and Delegation Patterns: The
CompositeServiceMessageSourceallows multiple message sources to be combined with configurable priority ordering. TheDelegatingServiceMessageSourceprovides Spring Framework integration while maintaining the core abstractions. - Dynamic Configuration Support: Through Spring Cloud integration, the system supports runtime updates to message sources without requiring application restarts. This capability is essential for cloud-native applications where configuration can change dynamically.
- Spring Ecosystem Integration: Progressive integration layers provide seamless compatibility with Spring Framework, Spring Boot auto-configuration, and Spring Cloud distributed configuration management. The system follows Spring conventions and lifecycle patterns.
| Module | Purpose |
|---|---|
| microsphere-i18n-parent | Defines the parent POM with dependency management and Spring Cloud version profiles |
| microsphere-i18n-dependencies | Centralizes dependency management for all project modules |
| microsphere-i18n-core | Provides fundamental i18n abstractions and message source implementations |
| microsphere-i18n-openfeign | Message resolution for OpenFeign clients |
| microsphere-i18n-spring | Integrates with Spring Framework's MessageSource and Environment |
| microsphere-i18n-spring-boot | Auto-configuration and actuator endpoints |
| microsphere-i18n-spring-cloud | Dynamic configuration updates via cloud config |
| microsphere-i18n-spring-cloud-server | Centralized i18n management server |
The easiest way to get started is by adding the Microsphere Internationalisation BOM (Bill of Materials) to your project's pom.xml:
<dependencyManagement>
<dependencies>
...
<!-- Microsphere Internationalisation Dependencies -->
<dependency>
<groupId>io.github.microsphere-projects</groupId>
<artifactId>microsphere-i18n-dependencies</artifactId>
<version>${microsphere-i18n.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
...
</dependencies>
</dependencyManagement>${microsphere-spring-boot.version} has two branches:
| Branches | Purpose | Latest Version |
|---|---|---|
| 0.2.x | Compatible with Spring Cloud 2022.0.x - 2025.0.x | 0.2.0 |
| 0.1.x | Compatible with Spring Cloud Hoxton - 2021.0.x | 0.1.0 |
Then add the specific modules you need:
<dependencies>
<dependency>
<!-- Microsphere Internationalisation Spring -->
<groupId>io.github.microsphere-projects</groupId>
<artifactId>microsphere-i18n-spring</artifactId>
</dependency>
</dependencies><dependencies>
<dependency>
<!-- Microsphere Internationalisation Spring Boot -->
<groupId>io.github.microsphere-projects</groupId>
<artifactId>microsphere-i18n-spring-boot</artifactId>
</dependency>
</dependencies><dependencies>
<dependency>
<!-- Microsphere Internationalisation Spring Cloud -->
<groupId>io.github.microsphere-projects</groupId>
<artifactId>microsphere-i18n-spring-cloud</artifactId>
</dependency>
</dependencies>You don't need to build from source unless you want to try out the latest code or contribute to the project.
To build the project, follow these steps:
- Clone the repository:
git clone https://github.com/microsphere-projects/microsphere-i18n.git- Build the source:
- Linux/MacOS:
./mvnw package- Windows:
mvnw.cmd packageWe welcome your contributions! Please read Code of Conduct before submitting a pull request.
- Before you log a bug, please search the issues to see if someone has already reported the problem.
- If the issue doesn't already exist, create a new issue.
- Please provide as much information as possible with the issue report.
- microsphere-i18n-core
- microsphere-i18n-openfeign
- microsphere-i18n-spring
- microsphere-i18n-spring-boot
- microsphere-i18n-spring-cloud
- microsphere-i18n-spring-cloud-server
The Microsphere Spring is released under the Apache License 2.0.