hngprojects / hng_boilerplate_nestjs

Description
Apache License 2.0
182 stars 105 forks source link

[FEAT] Enable Backend Integration for Multilingual Content - BACKEND #85

Closed theijhay closed 1 month ago

theijhay commented 1 month ago

Description

Acceptance Criteria

Purpose

Requirements

1. Develop Backend API Endpoints:

2. Implement Caching Mechanisms:

3. Ensure Data Security and Compliance:

Expected Outcome

1. Localized Content Delivery:

2. Improved Performance:

3. Data Security Compliance:

4. Scalability:

5. Reliability:

Endpoint Results

1. GET /api/v1/translations/{language}

2.POST /api/v1/translations

{
  "language": "en",
  "translations": {
    "key1": "Localized content 1",
    "key2": "Localized content 2"
  }
}

3. DELETE /api/v1/translations/{language}

4. GET /api/v1/languages

Tasks

Testing

1. Verify Valid Language Codes Return Expected Content:

2. Check Handling of Invalid Language Codes:

3. Verify Content Update Functionality:

4. Ensure Content Validation on Update:

5. Verify Deletion of Content:

6. Verify Caching Functionality for Language-Specific Content Retrieval:

7. Ensure Caching Expiration and Refresh Mechanism:

Technical Skills Required

Relevant Categories

Mentor

markessien commented 1 month ago

We are not using external services. Also I do not agree with calling a content api for every single piece of content. Frontend usually have translation files, this is a better way of supporting multi-lingual than what is described here

theijhay commented 1 month ago

We are not using external services. Also I do not agree with calling a content api for every single piece of content. Frontend usually have translation files, this is a better way of supporting multi-lingual than what is described here

It has been adjusted sir.