Giter VIP home page Giter VIP logo

digitalbeti's Introduction

Digitalbeti

Translations

In order to make a Django project translatable, you have to add a minimal number of hooks to your Python code and templates. These hooks are called translation strings.


Quick Start


You can use the `https://docs.djangoproject.com/en/3.1/intro/install/:: If you want to install it from source, grab the git repository from GitHub::

$ git clone https://github.com/nikhiljoshtalks/digitalbeti.git
$ cd digitalbeti
$ virtualenv env
$ source /env/bin/activate
$ pip3 install -r requirements.txt
$ python3 manage.py makemigrations
$ python3 manage.py migrate
$ python3 manage.py runserver

Instructions

  1. Add the locale middleware in between the session middleware and the common middleware in the settings.py file.
  2. Add a locale path where language.po file will be stored and create a directory for the same.
  3. Load the i18n tag in the template file where the translation is required.
  4. Place the text under trans tag in the template file.
  5. Run python3 manage.py makemessages -l 'language_code'
  6. Open the .po file in the directory under locale_paths and place the translation for the message id.
  7. Run python3 manage.py compilemessages
  8. Enable the language in language_code in settings.py and it will be done.

digitalbeti's People

Contributors

nikhilgupta18 avatar nikhiljoshtalks avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.