jaspr_localizations 1.0.0+beta.3 copy "jaspr_localizations: ^1.0.0+beta.3" to clipboard
jaspr_localizations: ^1.0.0+beta.3 copied to clipboard

Internationalization and localization support for Jaspr applications with ARB file generation.

example/lib/main.dart

// The entrypoint for the **server** environment.
//
// The [main] method will only be executed on the server during pre-rendering.
// To run code on the client, use the @client annotation.

// Server-specific jaspr import.
import 'package:jaspr/server.dart';

// Imports the [App] component.
import 'app.dart';

// This file is generated automatically by Jaspr, do not remove or edit.
import 'jaspr_options.dart';

void main() {
  // Initializes the server environment with the generated default options.
  Jaspr.initializeApp(
    options: defaultJasprOptions,
  );

  // Starts the app.
  //
  // [Document] renders the root document structure (<html>, <head> and <body>)
  // with the provided parameters and components.
  runApp(
    Document(
      title: 'example',
      styles: [
        // Special import rule to include to another css file.
        css.import('https://fonts.googleapis.cn/css?family=Roboto'),
        // Each style rule takes a valid css selector and a set of styles.
        // Styles are defined using type-safe css bindings and can be freely chained and nested.
        css('html, body').styles(
          width: 100.percent,
          minHeight: 100.vh,
          padding: Padding.zero,
          margin: Margin.zero,
          fontFamily: const FontFamily.list([FontFamily('Roboto'), FontFamilies.sansSerif]),
        ),
        css('h1').styles(
          margin: Margin.unset,
          fontSize: 4.rem,
        ),
      ],
      body: App(),
    ),
  );
}
0
likes
155
points
0
downloads
screenshot

Publisher

unverified uploader

Weekly Downloads

Internationalization and localization support for Jaspr applications with ARB file generation.

Repository (GitHub)
View/report issues

Topics

#l10n #localization #translations #language #jaspr

Documentation

API reference

License

MIT (license)

Dependencies

build, glob, intl, jaspr, meta, path, universal_web, yaml

More

Packages that depend on jaspr_localizations