Text Manager

Manage your wordings in one place, with multilingual support.

Dart Text Manager (v1.0.6+)

Version 1.0.6 of the Flutter Bridge now adds a way to make a request to the Text Manager directly in dart and not necessarily through the platform, this makes it possible to use the Text Manager in a sync context, and so removes the need for our previous custom widgets such as AppsPanelText

AppsPanel.texts.get("hello_world");
// or with args
AppsPanel.texts.get("hello_name", {"NAME": user.name});

// or with extension
"hello_world".tm();
"hello_name".tm({"NAME": user.name});

// with regular Text widget
Text("hello_world".tm()),

Platform TextManager (before v1.0.6)

Widget sample

AppsPanelText(
  textKey: "hello_user",
  args: {"NAME": user.name},
  style: myTextStyle,
),

String sample

final String message = await AppsPanel.textManager("hello_user", {"NAME": user.name});

Arguments

You can pass param args to AppsPanelTextManager() and textManager() to replace pattern.

// today = "Today it's ##DAY##, it's ##HOUR##"
AppsPanel.textManager("today", {"DAY": "Monday", "HOUR": "14h"});
// return "Today it's Monday, it's 14h"

Language/Locale

You can change the language used by the text manager at runtime using

AppsPanel.setCustomLocale(country, lang);

You can also retrieve the currently used language and country with:

await AppsPanel.getLanguage();
await AppsPanel.getCountry();

Android Text Manager

Refer to Text Manager (v5.2) :
https://appspanel.readme.io/docs/text-manager-v52

iOS Text Manager

Refer to Text Manager (v5) :
https://appspanel.readme.io/docs/ios-text-manager-v5