Skip to content

microsphere-projects/microsphere-i18n

Repository files navigation

Microsphere Internationalisation

Microsphere Projects for Internationalisation

Ask DeepWiki Maven Build Codecov Maven License

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.

Purpose and Scope

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. The ServiceMessageSource interface serves as the primary abstraction, with specialized implementations for different resource types.
  • Composite and Delegation Patterns: The CompositeServiceMessageSource allows multiple message sources to be combined with configurable priority ordering. The DelegatingServiceMessageSource provides 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.

Modules

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

Getting Started

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:

Spring Scenarios

<dependencies>
    <dependency>
        <!-- Microsphere Internationalisation Spring -->
        <groupId>io.github.microsphere-projects</groupId>
        <artifactId>microsphere-i18n-spring</artifactId>
    </dependency>
</dependencies>

Spring Boot Scenarios

<dependencies>
    <dependency>
        <!-- Microsphere Internationalisation Spring Boot -->
        <groupId>io.github.microsphere-projects</groupId>
        <artifactId>microsphere-i18n-spring-boot</artifactId>
    </dependency>
</dependencies>

Spring Cloud Scenarios

<dependencies>
    <dependency>
        <!-- Microsphere Internationalisation Spring Cloud -->
        <groupId>io.github.microsphere-projects</groupId>
        <artifactId>microsphere-i18n-spring-cloud</artifactId>
    </dependency>
</dependencies>

Building from Source

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:

  1. Clone the repository:
git clone https://github.com/microsphere-projects/microsphere-i18n.git
  1. Build the source:
  • Linux/MacOS:
./mvnw package
  • Windows:
mvnw.cmd package

Contributing

We welcome your contributions! Please read Code of Conduct before submitting a pull request.

Reporting Issues

  • 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.

Documentation

User Guide

DeepWiki Host

ZRead Host

Wiki

Github Host

JavaDoc

License

The Microsphere Spring is released under the Apache License 2.0.

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages