Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mcfilib/i18n
Internationalisation for Haskell
https://github.com/mcfilib/i18n
haskell internationalisation
Last synced: 3 months ago
JSON representation
Internationalisation for Haskell
- Host: GitHub
- URL: https://github.com/mcfilib/i18n
- Owner: mcfilib
- License: bsd-3-clause
- Created: 2016-08-12T14:46:11.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-12-01T11:02:30.000Z (about 1 year ago)
- Last Synced: 2024-03-15T12:52:44.108Z (11 months ago)
- Topics: haskell, internationalisation
- Language: Haskell
- Homepage: https://hackage.haskell.org/package/i18n
- Size: 43.9 KB
- Stars: 8
- Watchers: 3
- Forks: 3
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# i18n
A suite of tools for dealing with internationalisation in Haskell applications.
## Usage
### Library
``` haskell
-- Formatted for use in ghci.:set -XOverloadedStrings
:{
import qualified Data.Text.I18n as I18n
import qualified Data.Text.I18n.Po as I18n-- Setup i18n context.
(l10n, _) <- I18n.getL10n "./test/locale"-- Add an example annotation.
let example = I18n.gettext "Like tears in rain."-- Localise the example.
I18n.localize l10n (I18n.Locale "cym") example
:}
```## Development
### Tasks
```
$ make help
clean Clean Haskell local packages
format Format Haskell source
help Print available tasks
install Compile Haskell binary
repl Launch ghci
spec Run the specs
watch Compile on file changes
```### Tests
```
$ make spec
Examples: 11 Tried: 11 Errors: 0 Failures: 0
Examples: 3 Tried: 3 Errors: 0 Failures: 0
shakespeare-2.0.8.2: test (suite: test)
i18n-0.4.0.0: test (suite: i18n-test)
Completed 2 action(s).
```