GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com β€” GitHub - VeryGoodOpenSource/r13n: Regionalization support for Flutter. Built by Very Good Ventures πŸ¦„

This repository was archived by the owner on Mar 6, 2026. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

59 Commits
59 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
bricks/r13n
bricks/r13n
 
 
e2e
e2e
 
 
example
example
 
 
lib
lib
 
 
test
test
 
 
tool
tool
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
analysis_options.yaml
analysis_options.yaml
 
 
coverage_badge.svg
coverage_badge.svg
 
 
pubspec.yaml
pubspec.yaml
 
 

Repository files navigation

🌐 r13n

Deprecated: This repository has been archived and is no longer maintained. The r13n package has been discontinued on pub.dev and the r13n brick has been discontinued on BrickHub. There will be no further updates, bug fixes, or official support from Very Good Ventures.

If you need to continue development, you are welcome to fork this repository.

Very Good Ventures Very Good Ventures

ci coverage style: very good analysis License: MIT Powered by Mason


A Flutter package that makes regionalization easy. Heavily inspired by flutter_localizations and intl.

Similar to l10n which is short for localization, this package is called r13n as shorthand for regionalization.

Developed with πŸ’™ by Very Good Ventures πŸ¦„

What is regionalization? πŸ“

Regionalization helps you display text in the app based on a person's region.

Example: Say your app’s users are in the US and the UK. On your support page, you want to display the correct support email based on the user’s region. You can use the r13n package to display [email protected] to users in the UK and [email protected] to users in the US.

Similarly, l10n helps you display translations based on the user’s locale.

Example: When using l10n, your app will display text in the user’s preferred language.

The r13n package can and should be used in conjunction with l10n. r13n is an additional mechanism to personalize information presented to users in an app.

How it works βš™οΈ

Similar to l10n, the r13n package uses .arb files to house the region-specific configurations.

The arb file contains strings for region-specific values. The r13n brick is used to generate compile-safe Dart code in order to access the correct versions of each value based on the user's region.

Quick Start πŸš€

  1. For each supported region, add a new .arb file in lib/r13n/arb.
β”œβ”€β”€ r13n
β”‚   β”œβ”€β”€ arb
β”‚   β”‚   β”œβ”€β”€ app_gb.arb
β”‚   β”‚   └── app_us.arb
  1. Add the translated strings to each .arb file:

app_us.arb

{
    "@@region": "us",
    "supportEmail": "[email protected]"
}

app_gb.arb

{
    "@@region": "gb",
    "supportEmail": "[email protected]"
}
  1. If you don't already have mason_cli, use the following command:
$ dart pub global activate mason_cli
  1. Then, install the r13n brick globally.
$ mason add r13n -g
  1. Add a new yaml file to the root directory of the Flutter project called r13n.yaml with the following content:
arb-dir: lib/r13n/arb
template-arb-file: app_us.arb
  1. Generate files.
$ mason make r13n --on-conflict overwrite
β”œβ”€β”€ r13n
β”‚   β”œβ”€β”€ arb
β”‚   β”‚   β”œβ”€β”€ gen
β”‚   β”‚   β”‚   β”œβ”€β”€ app_regionalizations_gb.g.dart
β”‚   β”‚   β”‚   β”œβ”€β”€ app_regionalizations_us.g.dart
β”‚   β”‚   β”‚   └── app_regionalizations.g.dart
β”‚   β”‚   β”œβ”€β”€ app_us.arb
β”‚   β”‚   └── app_gb.arb
  1. Add a Regionalizations widget to the widget tree.
class MyApp extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    return Regionalizations(
      region: Region.fromPlatform(),
      delegates: const [AppRegionalizations.delegate],
      child: MaterialApp(...)
      ...
    );
  1. Use the new string.
import 'package:example/r13n/r13n.dart';

@override
Widget build(BuildContext context) {
  final r13n = AppRegionalizations.of(context);
  return Text(r13n.supportEmail);
}

Roadmap πŸ—Ί

Note: This roadmap will not be pursued. The package is discontinued and this repository is archived.

  • Support asynchronous delegates
  • Support regionalization based on IP address
  • Provide API's to support sub-regions (for example, states in the U.S.)

Additional Resources πŸ“š

For more information, see the example, the r13n brick and the source code.

About

Regionalization support for Flutter. Built by Very Good Ventures πŸ¦„

pub.dev/packages/r13n

Topics

dartflutterflutter-packl10nr10nregionalization

Resources

Readme
MIT license
Activity
Custom properties

Stars

76 stars

Watchers

3 watching

Forks

4 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402775 β€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Γ—600. No cookies required.