bablic
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

Bablic-Node-SDK

To install simply use NPM:

$ npm install --save bablic

Config your app:

Javascript:

const {create} = require("bablic");
app.use(create({
   siteId: '[your site id]',
   rootUrl: 'http://[root url of your site]',
   subDir: true, // if you want to use sub dir for languages like /es/ /fr/
   }));
   
app.get('/',function(req,res) { 
   console.log('the current language for the user is',req.bablic.locale);
   res.render('index.ejs',{});
});

Typescript:

import {create} from "bablic";
app.use(create({
   siteId: '[your site id]',
   rootUrl: 'http://[root url of your site]',
   subDir: true, // if you want to use sub dir for languages like /es/ /fr/
   }));

In your layout template file you can add the snippet:


<html>
   <head>
      <%- bablic.snippetTop %>
   </head>
   <body>
      <%- body %>
    </body>
</html>

And use!

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.10latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.10
1.1.01
1.0.450
1.0.440
1.0.430
1.0.420
1.0.411
1.0.390
1.0.3862
1.0.370
1.0.360
1.0.340
1.0.331
1.0.320
1.0.310
1.0.300
1.0.290
1.0.280
1.0.270
1.0.30
1.0.20
1.0.10
1.0.00
0.1.20
0.1.10
0.1.00
0.0.540
0.0.530
0.0.520
0.0.510
0.0.500
0.0.490
0.0.480
0.0.470
0.0.460
0.0.450
0.0.440
0.0.430
0.0.420
0.0.410
0.0.400
0.0.380
0.0.360
0.0.350
0.0.340
0.0.330
0.0.320
0.0.310
0.0.300
0.0.290
0.0.280
0.0.270
0.0.250
0.0.240
0.0.230
0.0.220
0.0.210
0.0.200
0.0.190
0.0.180
0.0.170
0.0.160
0.0.150
0.0.140
0.0.130
0.0.120
0.0.110
0.0.100
0.0.90
0.0.80
0.0.70
0.0.60
0.0.50
0.0.40
0.0.30
0.0.20
0.0.10

Package Sidebar

Install

npm i bablic

Weekly Downloads

65

Version

1.1.1

License

GPL v2

Unpacked Size

113 kB

Total Files

21

Last publish

Collaborators

  • ishaibablic
  • talbablic