Mods
Resource Packs
Data Packs
Modpacks
Shaders
Plugins
Mods Resource Packs Data Packs Plugins Shaders Modpacks
Get Modrinth App Upgrade to Modrinth+
Sign in
ModsPluginsData PacksShadersResource PacksModpacks
Sign in
Settings
RichLocalTextLib

RichLocalTextLib

Rich text support for translations

1,210
3
Utility
AboutChangelogVersions

RichLokalТекстLib

RichLocalText is a library that allows modders and pack-makers to use translated rich text.
Easily add font styles and colors anywhere without code!

Installation

Drop the .jar into the /mods folder, and enjoy rich localization text.
Requires no other dependencies.

*resourcepack utilizing the Rich™ Lokal™ Текст™ Capabilities™ not included.

Usage

Use /tellraw-like format in language files.
When overriding a string that has format placeholders use {"index":n} instead;

Example, changing the default chat text format:

//en_us.json
{
  "chat.type.text": 
  [
    "", 
    {"text":"A mysterious stranger known only as <", "color": "gray"},
    {"index":0, "obfuscated": true},
    {"text":"> uttered: \"", "color": "gray"},
    {"index":1},
    {"text":"\"", "color": "gray"}
  ]
}

N.B.: If your first text component is styled, all components after it will inherit its style. This is a Minecraft quirk that we are not going to fix.

This results in text like this:
screenshot of rich text

90% of ad revenue goes to creators

Support creators and Modrinth ad-free with Modrinth+

Compatibility

Minecraft: Java Edition

1.17.x
1.16.5

Platforms

Fabric
Forge

Supported environments

Client-side

Links

Report issues View source Join Discord server

Creators

BasiqueEvangelist
BasiqueEvangelist Owner
Jetsparrow
Jetsparrow Co-owner

Details

Licensed LGPL-3.0-only
Published 3 years ago
Updated 3 years ago

Modrinth is open source.

main@9fd0f68

© Rinth, Inc.

Company

TermsPrivacyRulesCareers

Resources

SupportBlogDocsStatus

Interact

Discord X (Twitter) Mastodon Crowdin
Get Modrinth App Settings
NOT AN OFFICIAL MINECRAFT SERVICE. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.