web

command
v0.0.0-...-4f8f121 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2019 License: MIT Imports: 7 Imported by: 0

README

This example application demonstrates the approach to localization web-based Go applications, with the following properties:

  1. Display language is determined from the browser
  2. Display language can be overridden by a cooke and/or query parameter
  3. Localization is stored in native Go files ([string] string maps) and is compiled with the application
  4. You can provide developer comments for each translatable entity
  5. Localization files are generated by Serge; generated .po files are used to provide translation (you can do a continuous localization of your project)
  6. Formatting (named placeholders, support for plurals/conditionals) is provided by Plurr library
  7. Support for inserting localized strings and string formatting in html/template-based templates
  8. Automatic generation of pseudotranslated resources for quick testing

See .serge subfolder for an additional README on the localization workflow.

Running

Use ./build.sh script to build the binary, then run ./server and go to http://localhost:8080/ to see the page in your preferred language. To change the display language, use the links in the footer of the demo page. When language is not set explicitly, it is detected from your browser settings.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL