0.8.19 • Published 23 days ago

prodap-lore-locale v0.8.19

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
23 days ago

Prodap Lore Locale

Package used to perform the internationalization of Lore.

See below how to search for specific localization and translation according to the key:

Installation

This is a Node.js library available through the npm registry. Before installing, download and install Node.js. Node.js 18.10.0 or higher is required.

If this is a brand new project, make sure you create a package.json first with the command npm init.

Installation is done using the command yarn add or npm install:

$ yarn add prodap-lore-locale

or

$ npm install prodap-lore-locale

Usage

Below are some ways to get the locale information contained in this library:

Without the locale

Without passing the locale the class will return all locales.

import { Locales } from 'prodap-lore-locale'

const locales = new Locales()

console.log(getLocales) // { "en-US": { "hello": "Hello", ... }, "pt-BR": { "hello": "Olá", ... } }

Passing the locale

Passing the locale the class will return the corresponding locale.

import { Locales } from 'prodap-lore-locale'

const locales = new Locales({ locale: 'pt-BR' })

console.log(getLocales) // { "pt-BR": { "hello": "Olá", ... } }

Looking for a specific translation

When searching for a specific translation, simply enter the corresponding key.

import { Locales } from 'prodap-lore-locale'

const locales = new Locales({ locale: 'pt-BR' })
const hello = locales.translate('hello') // { "hello": "Olá" }

console.log(hello) // Olá

Looking for a specific translation and replace

When looking for a specific translation and want to replace some value, just type the corresponding key and use replace.

import { Locales } from 'prodap-lore-locale'

const locales = new Locales({ locale: 'pt-BR' })
const helloPeople = locales.translate('hello_people').replace('{{VALUE}}', 'Lore') // { "hello_people": "Olá {{VALUE}}" }

console.log(helloPeople) // Olá Lore

Get current library location

In this way it is possible to obtain the current library location.

import { Locales } from 'prodap-lore-locale'

const locales = new Locales({ locale: 'pt-BR' })
const getCurrentLocale = locales.getCurrentLocale()

console.log(getCurrentLocale) // pt-BR

Get library locations

In this way it is possible to obtain the library locations.

import { Locales } from 'prodap-lore-locale'

const locales = new Locales()
const getLocales = locales.getLocales()

console.log(getLocales) // [ "en-US", "pt-BR", ... ]
0.8.19

23 days ago

0.8.9

29 days ago

0.8.7

29 days ago

0.8.12

28 days ago

0.8.11

28 days ago

0.8.14

25 days ago

0.8.13

25 days ago

0.8.10

28 days ago

0.8.16

24 days ago

0.8.15

24 days ago

0.8.18

24 days ago

0.8.17

24 days ago

0.8.5

1 month ago

0.8.4

1 month ago

0.8.6

1 month ago

0.8.1

1 month ago

0.8.3

1 month ago

0.8.2

1 month ago

0.5.10

2 months ago

0.7.2

1 month ago

0.7.1

2 months ago

0.7.4

1 month ago

0.7.3

1 month ago

0.7.0

2 months ago

0.4.10

3 months ago

0.4.11

2 months ago

0.8.0

1 month ago

0.6.7

2 months ago

0.6.6

2 months ago

0.6.9

2 months ago

0.6.8

2 months ago

0.6.10

2 months ago

0.6.11

2 months ago

0.5.4

2 months ago

0.5.3

2 months ago

0.5.6

2 months ago

0.5.5

2 months ago

0.5.0

2 months ago

0.5.2

2 months ago

0.5.1

2 months ago

0.7.9

1 month ago

0.7.6

1 month ago

0.7.5

1 month ago

0.7.8

1 month ago

0.7.7

1 month ago

0.6.3

2 months ago

0.6.2

2 months ago

0.6.5

2 months ago

0.6.4

2 months ago

0.6.1

2 months ago

0.6.0

2 months ago

0.4.9

3 months ago

0.4.8

3 months ago

0.7.11

1 month ago

0.7.10

1 month ago

0.7.13

1 month ago

0.7.12

1 month ago

0.5.8

2 months ago

0.5.7

2 months ago

0.5.9

2 months ago

0.7.15

1 month ago

0.7.14

1 month ago

0.7.16

1 month ago

0.4.5

3 months ago

0.4.4

3 months ago

0.4.7

3 months ago

0.4.6

3 months ago

0.4.1

3 months ago

0.4.0

3 months ago

0.4.3

3 months ago

0.4.2

3 months ago

0.3.14

3 months ago

0.0.150

5 months ago

0.0.205

4 months ago

0.0.206

4 months ago

0.0.200

4 months ago

0.3.0

3 months ago

0.3.6

3 months ago

0.3.5

3 months ago

0.3.8

3 months ago

0.3.7

3 months ago

0.3.2

3 months ago

0.3.1

3 months ago

0.3.4

3 months ago

0.3.3

3 months ago

0.0.128

6 months ago

0.0.127

6 months ago

0.0.126

6 months ago

0.0.129

6 months ago

0.1.0

4 months ago

0.1.2

4 months ago

0.1.1

4 months ago

0.0.139

5 months ago

0.0.138

6 months ago

0.0.137

6 months ago

0.0.136

6 months ago

0.3.9

3 months ago

0.0.131

6 months ago

0.0.130

6 months ago

0.3.13

3 months ago

0.0.135

6 months ago

0.3.12

3 months ago

0.0.134

6 months ago

0.3.11

3 months ago

0.0.133

6 months ago

0.3.10

3 months ago

0.0.132

6 months ago

0.0.149

5 months ago

0.0.148

5 months ago

0.0.147

5 months ago

0.0.142

5 months ago

0.0.141

5 months ago

0.0.140

5 months ago

0.0.146

5 months ago

0.0.145

5 months ago

0.0.144

5 months ago

0.0.143

5 months ago

0.2.1

4 months ago

0.2.0

4 months ago

0.2.7

4 months ago

0.2.6

4 months ago

0.2.9

4 months ago

0.2.8

4 months ago

0.2.3

4 months ago

0.2.2

4 months ago

0.2.5

4 months ago

0.2.4

4 months ago

0.0.124

6 months ago

0.0.123

6 months ago

0.0.122

7 months ago

0.0.121

7 months ago

0.0.120

7 months ago

0.0.119

7 months ago

0.0.117

8 months ago

0.0.116

8 months ago

0.0.118

8 months ago

0.0.115

8 months ago

0.0.114

8 months ago

0.0.113

8 months ago

0.0.112

8 months ago

0.0.111

9 months ago

0.0.110

9 months ago

0.0.109

9 months ago

0.0.108

9 months ago

0.0.107

9 months ago

0.0.106

9 months ago

0.0.105

10 months ago

0.0.104

10 months ago

0.0.103

11 months ago

0.0.102

11 months ago

0.0.101

11 months ago

0.0.100

11 months ago

0.0.99

12 months ago

0.0.98

12 months ago

0.0.97

12 months ago

0.0.84

1 year ago

0.0.85

1 year ago

0.0.86

1 year ago

0.0.87

1 year ago

0.0.88

1 year ago

0.0.89

1 year ago

0.0.80

1 year ago

0.0.82

1 year ago

0.0.83

1 year ago

0.0.75

1 year ago

0.0.77

1 year ago

0.0.78

1 year ago

0.0.79

1 year ago

0.0.95

12 months ago

0.0.96

12 months ago

0.0.90

1 year ago

0.0.91

1 year ago

0.0.92

1 year ago

0.0.93

12 months ago

0.0.94

12 months ago

0.0.73

1 year ago

0.0.74

1 year ago

0.0.70

1 year ago

0.0.71

1 year ago

0.0.72

1 year ago

0.0.47

2 years ago

0.0.62

1 year ago

0.0.63

1 year ago

0.0.64

1 year ago

0.0.65

1 year ago

0.0.66

1 year ago

0.0.67

1 year ago

0.0.68

1 year ago

0.0.69

1 year ago

0.0.60

1 year ago

0.0.61

1 year ago

0.0.59

1 year ago

0.0.51

2 years ago

0.0.52

1 year ago

0.0.53

1 year ago

0.0.54

1 year ago

0.0.55

1 year ago

0.0.56

1 year ago

0.0.57

1 year ago

0.0.58

1 year ago

0.0.48

2 years ago

0.0.49

2 years ago

0.0.40

2 years ago

0.0.41

2 years ago

0.0.42

2 years ago

0.0.43

2 years ago

0.0.44

2 years ago

0.0.45

2 years ago

0.0.46

2 years ago

0.0.37

2 years ago

0.0.38

2 years ago

0.0.39

2 years ago

0.0.34

2 years ago

0.0.35

2 years ago

0.0.36

2 years ago

0.0.20

2 years ago

0.0.21

2 years ago

0.0.22

2 years ago

0.0.23

2 years ago

0.0.24

2 years ago

0.0.25

2 years ago

0.0.18

2 years ago

0.0.19

2 years ago

0.0.30

2 years ago

0.0.31

2 years ago

0.0.32

2 years ago

0.0.33

2 years ago

0.0.26

2 years ago

0.0.27

2 years ago

0.0.28

2 years ago

0.0.29

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago