Page:
Localization
Pages
API SMHI
API TimeEdit
Accessibility Testing
Api documentation
Bat/Ps
Branch Creation
C# Coding Convention
CSS Coding Convention
Coding Conventions
Creating new databases
Dapper
Documentation for service endpoints
Documentation of useTemperature and mock sensor
Energy endpoints
Environment
Evaluation react-grid-layout
Evaluation Localization
Evaluation Password hashing
Evaluation Testing framework
Evaluation of Logging Frameworks
Formatter
Frontend model
Generic Diagram for Sensor data flow
Home
How to- Creating Databases in Docker
Implementing different Styles
Implementing new Mockup sensors
Implementing new Views
Installation script documentation
Installation
Issues
JSON Coding Convention
Jest Testing
Layout endpoints
Linux
Localization
Login endpoints
Mac
Middleware model
Mock API Ceation Guidelines
Mockup models
Model Tools and Standards
Parking endpoints
React/JavaScript Coding Convention
React
Reviews
Room booking endpoints
SQL Coding Convention
Scheduled Database tasks
Scripting Coding Convention
Secrets and .env
Server Access
Server-Deployment
Service/API models
System models
System requirements
Temperature endpoints
Testing API with Bruno
Testing Architecture
Testing frontend for Mobile devices
Testing frontend with Playwright
Testing methodology
Västtrafik API
Webpage Design
Windows
pg_cron and scheduled database jobs
xUnit Testing
No results
1
Localization
b24hugst edited this page 2026-05-15 09:52:12 +00:00
Table of Contents
How to use
1. Create an entry in both json files en/sv
2. Import UseLanguage
3. Use translate("xxx.xxx")
Example:
import {useLanguage} from '../features/useLanguage';
export default function Legal() {
const { translate } = useLanguage();
return (
<>
<h1>{translate('legal.title')}</h1>
<p>{translate('legal.content')}</p>
</>
);
}
Standard
Should be written using namespaces, with the page/component as the root namespace, and additional namespaces for subsections where suitable. Linebreaks should be used after every key for better readability and structure. Groups should be written in alphabetical order.
Don't forget that if two keys have the same starting letter, you need to sort using the second one, and so on. And that 0 - 9 comes before A - Z.
Here's an example (added extra spaces for readability):
{
"settings.account.accountTitle": "Account",
"settings.account.displayName": "Display Name",
"settings.account.email": "E-mail",
"settings.account.password": "Password",
"settings.application.accessibility": "Accessibility",
"settings.application.applicationTitle": "Application",
"settings.application.defaultPage": "Default Page",
"settings.preferences.language": "Language",
"settings.preferences.notifications": "Notifications",
"settings.preferences.preferencesTitle": "Preferences",
"settings.privacySecurity.2FA": "Two-Factor Authentication",
"settings.privacySecurity.deleteAccount": "Delete Account",
"settings.privacySecurity.privacySecurityTitle": "Privacy & Security",
"settings.settingsTitle": "Settings",
}
1. Setup
2. Standards
- Coding Conventions
- Issues
- Branch creation
- Reviews
- Implementation Standards
- [WIP] Creating new databases
- Localization
3. Models and Diagrams
4. Testing
5. Documentation
- Documentation for service endpoints
- API documentation
- Webpage Design
- Secrets and .env
- Evaluations
- Installation and Rebuild script documentation
6. Guides and How-to's
7. Micro Service Mockup Api
- Guidelines Mircro Service Mockup
- Documentation of useTemperature/useTemperatureTimeSeries mockup sensor