Introduction
Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.
I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.
I also build and publish a variety of tools, libraries, and open-source projects.
This article explores ERC-1444, a proposal that allows anyone to register and retrieve human-readable text in different languages and styles for machine-readable codes returned by smart contracts.
This article translates, summarizes, and supplements the proposal linked below.
I have also covered various other EIPs:
Overview
ERC-1444 provides a way to convert machine-readable codes emitted by smart contracts into human-readable text in any language or wording. The translated text is stored on-chain, where anyone can create, register, share, and use it. Because users can freely create translations rather than being restricted to a specific language, the approach accommodates diverse cultures and languages. It eliminates the need to rely on fixed English messages and enables a more inclusive user experience.
Motivation
When users interact with smart contracts, they need feedback about the results of those operations. Simply displaying numerical codes or fixed English messages makes the results difficult for ordinary users to understand and degrades both the user experience (UX) and developer experience (DX).
For Ethereum to gain widespread adoption as a truly global platform, it needs a way to communicate transaction results in a form that everyone can understand. ERC-1444 makes it possible to associate natural-language messages with machine-readable statuses and state codes (such as boolean values, enums, and ERC-1066 codes) on-chain. This provides feedback that can be displayed directly in a UI, gives developers more contextual information, and makes interactions more familiar and intuitive for users.
Such a mechanism enables consistent, understandable messaging for blockchain interactions across languages worldwide.
Specification
Contract architecture
ERC-1444 is designed to let users retrieve human-readable text corresponding to smart contract states and status codes in the language and wording of their choice. The mechanism consists primarily of two types of contracts.
The first is a Localization contract, which manages codes and their corresponding text. The second is a LocalizationPreferences contract, which records the Localization contract that each user prefers. This allows different users to retrieve text in different languages or styles for the same code.
The proposal also defines a fallback Localization contract (which must provide a translation for every code). This fallback is used when a translation in the user's preferred localization has not been registered.
Localization contract
interface Localization {
function textFor(bytes32 _code) external view returns (string _text);
}A Localization contract is a simple contract that stores a particular code (bytes32) and its corresponding text (string).
It allows predefined status codes and signals to be retrieved in a human-readable form.
textFor
function textFor(bytes32 _code) external view returns (string _text);Retrieves the text corresponding to a specified code.
If the specified _code is registered in the mapping, the function returns the corresponding string.
Otherwise, it returns an empty string ("").
Parameters
_code- The code identifying the information to display in human-readable form.
Return value
_text- The corresponding text.
- An empty string if no text exists.
LocalizationPreferences contract
interface LocalizationPreferences {
function set(Localization _localization) external returns (bool);
function textFor(bytes32 _code) external view returns (bool _wasFound, string _text);
}This contract records and manages translation preferences for individual users.
It determines which Localization contract to use based on the originating caller (tx.origin) and retrieves the corresponding text.
If that contract does not contain the requested translation, the lookup is delegated to the registered fallback contract.
set
function set(Localization _localization) external returns (bool);Registers the Localization contract that a user wants to use.
It records the preferred translation contract for the user identified by tx.origin.
This preference is used when textFor is called.
Parameters
_localization- The address of the preferred
Localizationcontract.
- The address of the preferred
textFor
function textFor(bytes32 _code) external view returns (bool _wasFound, string _text);Retrieves text according to the user's translation preferences.
It looks up the specified code in the user's registered Localization contract.
If no matching string is found, the text is retrieved from the fallback Localization contract.
The _wasFound return value indicates whether the fallback was used.
Parameters
_code- The code to translate.
Return values
_wasFoundtrueif the text was found in the preferred localization, orfalseif the fallback was used.
_text- The corresponding text.
String format
All text must be encoded in UTF-8. Special characters, Japanese text, and emoji are supported, allowing for a wide range of linguistic expressions.
Template strings
The proposal also supports template strings written using the ANSI C printf format.
When multiple parameters are involved, POSIX positional formatting (for example, %1$s) is recommended.
Reference implementation
pragma solidity ^0.4.25;
contract Localization {
mapping(bytes32 => string) private dictionary_;
constructor() public {}
// Currently overwrites anything
function set(bytes32 _code, string _message) external {
dictionary_[_code] = _message;
}
function textFor(bytes32 _code) external view returns (string _message) {
return dictionary_[_code];
}
}
contract LocalizationPreference {
mapping(address => Localization) private registry_;
Localization public defaultLocalization;
bytes32 private empty_ = keccak256(abi.encodePacked(""));
constructor(Localization _defaultLocalization) public {
defaultLocalization = _defaultLocalization;
}
function set(Localization _localization) external returns (bool) {
registry_[tx.origin] = _localization;
return true;
}
function get(bytes32 _code) external view returns (bool, string) {
return get(_code, tx.origin);
}
// Primarily for testing
function get(bytes32 _code, address _who) public view returns (bool, string) {
string memory text = getLocalizationFor(_who).textFor(_code);
if (keccak256(abi.encodePacked(text)) != empty_) {
return (true, text);
} else {
return (false, defaultLocalization.textFor(_code));
}
}
function getLocalizationFor(address _who) internal view returns (Localization) {
if (Localization(registry_[_who]) == Localization(0)) {
return Localization(defaultLocalization);
} else {
return Localization(registry_[tx.origin]);
}
}
}Additional considerations
Why use bytes32 keys?
The bytes32 type is highly efficient because it is a fundamental unit of the EVM.
It can represent approximately 10 to the power of 77 distinct values, enough to uniquely represent virtually any practical set of codes, states, and identifiers.
Even if a key longer than 32 bytes is needed, it can readily be mapped to bytes32 by hashing it.
Smaller types (such as the bytes1 type used in ERC-1066) can also be embedded directly in bytes32, providing both extensibility and compatibility.
Global centralized management versus local decentralized management
ERC-1444 does not depend on a single global registry. Instead, it allows multiple LocalizationPreferences contracts to be deployed freely for different use cases. This design emphasizes flexibility and decentralization, while still allowing an agreed-upon shared instance when wallets or frameworks want to use one in common.
A unified registry of registries might appear convenient, but it would introduce centralization and reduced flexibility, along with issues involving upgrades, naming collisions, and complex lookups. ERC-1444 therefore does not adopt that approach. Its priority is lightweight, decentralized, and independently managed operation.
Comparison with off-chain storage
Another approach would be to store translated messages off-chain and return only a bytes32 key on-chain. However, this introduces availability concerns.
External resources such as web servers are not guaranteed to be operational, making this approach unsuitable for situations where text must be immediately available on-chain, such as a revert message.
For that reason, translation data is intended to reside on-chain.
Choice of character encoding
All strings must use UTF-8. UTF-8 maintains compatibility with ASCII while covering natural languages, symbols, and emoji worldwide. It is the most widely used encoding and is well suited to internationalization.
Behavior when text is not found
If a user's preferred translation does not exist, merely returning an empty string ("") would undermine the purpose of the localization system.
Two approaches are possible.
One is to return a message such as Translation not found, but the specification does not adopt this approach. Such a message conveys little useful information about the original code.
Instead, ERC-1444 adopts a fallback translation mechanism.
This provides a minimum set of translations in widely used languages such as English or Chinese and is consulted when the user has not configured a preference or the preferred translation cannot be found.
The boolean returned by textFor indicates whether the preferred localization or the fallback supplied the text, which can be used for UI presentation and explanations.
Crowdsourcing decentralized translations
For Ethereum to become a genuinely global system, everyone must be able to receive information in familiar languages and expressions. Rather than defining translations centrally, ERC-1444 allows anyone to create, register, and share them, accommodating cultural and linguistic diversity. This design also aligns with the decentralized principles of Web3.
Printf-style templates
Translation text uses printf-style templates derived from the C programming language.
Many programming languages and libraries support this format, making it familiar to developers and simplifying the insertion of values into UI text.
Why positional parameter fields matter
Languages differ in word order and grammatical structure. Positional arguments such as %1$s and %2$d accommodate changes in argument order, allowing the same data to be used in translations across languages.
A translation can also use only some of the arguments, omitting technical information where appropriate.
Template interpolation strategy
The recommended approach is to return the template string unchanged and perform the actual interpolation (substitution of placeholders) off-chain. For example, a smart contract can emit only a template code and arguments in an event. The client then retrieves the corresponding translation and combines it with the supplied values for fast, flexible rendering.
Implementation decisions outside the specification
ERC-1444 does not prescribe the following design choices. They are left to implementers.
- Whether the default Localization contract is public or private.
- Who may register text (for example, the deployer, the owner, anyone, or allowlisted accounts).
- When text may be registered (for example, only in the constructor, at any time, or through append-only updates that prohibit overwriting).
This flexibility is essential for supporting a wide range of use cases. Implementers can tailor the design to the needs of their protocols, tools, and DApps.
Citation
Brooklyn Zelenka (@expede), Jennifer Cooper (@jenncoop), "ERC-1444: Localized Messaging with Signal-to-Text [DRAFT]," Ethereum Improvement Proposals, no. 1444, September 2018. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-1444.
Conclusion
This article covered ERC-1444, a proposal that allows anyone to register and retrieve human-readable text in different languages and styles for machine-readable codes returned by smart contracts. I hope it has been helpful.
If you have questions, feel free to reach out via Twitter DM:
I also publish content on other platforms:



