Quick tips for translators and developers working with string constants
All string constants follow this pattern: area.section.string
area.section.string is the constant name. The "string" part is just the variable identifier.
public - Public pagesmember - Member-only pagesadmin - Admin pagesmail - Email templatesadmin, public, and member areas.
login - Login pagesprofile - User profilessettings - Settings pagessearch - Search functionalitydashboard, home, about, contact, etc.
welcome, savebtn, edittextWhen you create a new project, it automatically comes with this structure:
dashboard - Admin dashboardlogin - Admin loginsettings - Admin settingshome - Homepageabout - About pagecontact - Contact pageprofile - User profilemessages - User messagespreferences - User preferencesBefore creating a new string, check if similar strings already exist to avoid duplicates. Area filtering is recommended to avoid confusion between different contexts (e.g., admin vs public areas):
{
"text": "Welcome to our website!",
"area": "public",
"limit": 10,
"include_partial": true
}
{
"success": true,
"search_text": "Welcome to our website!",
"search_area": "public",
"total_found": 3,
"results": {
"exact_matches": [
{
"id": 123,
"key": "welcome",
"base_text": "Welcome to our website!",
"area_name": "public",
"section_name": "home",
"match_type": "exact_match",
"similarity_score": 100
}
],
"partial_matches": [
{
"id": 124,
"key": "welcome_msg",
"base_text": "Welcome message",
"area_name": "public",
"section_name": "login",
"match_type": "contains_new",
"similarity_score": 80
}
]
},
"recommendations": {
"exact_match_found": "Use existing string instead of creating duplicate",
"suggested_action": "use_existing"
},
"suggested_alternatives": [
{
"action": "use_existing",
"string_id": 123,
"full_key": "public.home.welcome",
"base_text": "Welcome to our website!",
"api_endpoints": {
"view_string": "GET https://la.deltascripts.com/api/v1/projects/64/strings/123"
}
}
]
}
Use the suggest API to get valid constant names based on your text:
text - Your text (e.g., "Welcome to our site")area - Area context (public, member, admin)section - Section context (login, profile, etc.)limit - Max suggestions (default: 10, max: 50)GET https://la.deltascripts.com/api/v1/projects/64/strings:suggest?text=Welcome%20message&area=public§ion=home&limit=10
text parameter should be URL-encoded:
Welcome message → Welcome%20messageHello, world! → Hello%2C%20world%21User's profile → User%27s%20profilearea and section parameters use simple lowercase names and don't need encoding.
{
"suggestions": [
{
"constant": "welcome",
"full_key": "public.home.welcome",
"length": 7
},
{
"constant": "welcomebtn",
"full_key": "public.home.welcomebtn",
"length": 8
}
],
"rules": {
"max_length": 8,
"allowed_chars": "a-z only",
"format": "area.section.string"
}
}
Use the AI-optimized propose API for intelligent feedback and duplicate detection:
{
"area": "public",
"section": "home",
"base_text": "Welcome to our website!",
"suggested_key": "welcome" // Optional - AI will generate if not provided
}
{
"success": true,
"message": "String created successfully",
"data": {
"id": 123,
"key": "welcome",
"full_key": "public.home.welcome",
"base_text": "Welcome to our website!",
"area": "public",
"section": "home",
"status": "active",
"created_at": "2025-01-27 10:30:00",
"created_by": "John Doe"
},
"similar_strings_found": null,
"api_endpoints": {
"view_string": "GET https://la.deltascripts.com/api/v1/projects/64/strings/123",
"update_string": "PUT https://la.deltascripts.com/api/v1/projects/64/strings/123",
"delete_string": "DELETE https://la.deltascripts.com/api/v1/projects/64/strings/123",
"list_all_strings": "GET https://la.deltascripts.com/api/v1/projects/64/strings"
}
}
{
"success": false,
"error": "String key already exists",
"duplicate_info": {
"id": 123,
"key": "welcome",
"existing_text": "Welcome to our website!",
"status": "active",
"created_at": "2025-01-27 10:30:00"
},
"suggestions": {
"use_existing": "The string already exists with ID 123",
"update_existing": "Use PUT /api/v1/projects/64/strings/123 to update the existing string",
"different_key": "Try a different key or use the suggest endpoint to get alternatives"
},
"api_endpoints": {
"suggest_alternatives": "GET https://la.deltascripts.com/api/v1/projects/64/strings:suggest?text=Welcome to our website!&area=public§ion=home",
"update_existing": "PUT https://la.deltascripts.com/api/v1/projects/64/strings/123",
"view_existing": "GET https://la.deltascripts.com/api/v1/projects/64/strings/123"
}
}
{
"success": true,
"message": "String created successfully",
"warning": "⚠️ Exact or case-insensitive match found! Consider using existing string instead.",
"data": {
"id": 456,
"key": "welcome",
"full_key": "public.home.welcome",
"base_text": "Welcome to our website!",
"area": "public",
"section": "home",
"status": "active",
"created_at": "2025-01-27 10:30:00",
"created_by": "John Doe"
},
"similar_strings_found": {
"exact_matches": [
{
"id": 123,
"key": "welcome",
"base_text": "Welcome to our website!",
"area_name": "public",
"section_name": "login",
"match_type": "exact_match"
}
],
"partial_matches": [],
"total_found": 1,
"recommendations": {
"exact_match_found": "Consider using existing string instead of creating duplicate",
"suggested_action": "delete_new_use_existing"
}
},
"suggested_alternatives": [
{
"action": "use_existing",
"string_id": 123,
"full_key": "public.login.welcome",
"base_text": "Welcome to our website!",
"api_endpoint": "GET https://la.deltascripts.com/api/v1/projects/64/strings/123"
}
]
}
publicloginwelcome, username, password, loginbtnmemberprofileeditbtn, savebtn, name, emailadminsettingssavebtn, cancelbtn, title, descpublicsearchsearchbtn, placeholder, resultsmailwelcome, reset, notificationsubject, greeting, body, footermail.welcome.subject, mail.welcome.greetingmail.reset.subject, mail.reset.bodymail.notify.subject, mail.notify.bodyOptimized workflow for AI platforms and Replit.com integration with simple project-based authentication:
curl -X POST "https://la.deltascripts.com/api/v1/projects/64/strings/ai" \
-H "Content-Type: application/json" \
-d '{
"action": "info"
}'
curl -X POST "https://la.deltascripts.com/api/v1/projects/64/strings/ai" \
-H "Content-Type: application/json" \
-d '{
"action": "find_similar",
"text": "Welcome to our website!",
"area": "public",
"limit": 10
}'
curl -X POST "https://la.deltascripts.com/api/v1/projects/64/strings/ai" \
-H "Content-Type: application/json" \
-d '{
"action": "create",
"area": "public",
"section": "home",
"base_text": "Welcome to our website!",
"suggested_key": "welcome"
}'
success field in responsesapi_endpoints provided in responses for next actionssimilar_strings_found field to avoid content duplication| Action | API Call | Purpose |
|---|---|---|
| Get Suggestions | GET https://la.deltascripts.com/api/v1/projects/{id}/strings:suggest |
Get valid string names for your text |
| Create String (AI) | POST https://la.deltascripts.com/api/v1/projects/{id}/strings:ai-propose |
Create new string with intelligent feedback and duplicate detection |
| Create String (Standard) | POST https://la.deltascripts.com/api/v1/projects/{id}/strings:propose |
Create new string with chosen string name |
| List Strings | GET https://la.deltascripts.com/api/v1/projects/{id}/strings |
View all strings in project |
| Filter Strings | GET https://la.deltascripts.com/api/v1/projects/{id}/strings?area=public§ion=login |
Filter strings by area and section |
| Update Base Text | PUT https://la.deltascripts.com/api/v1/projects/{id}/strings/{key} |
Update English source text of a single string (use string key like 'login_welcome', not full path) |
| Bulk Update Base Text | POST https://la.deltascripts.com/api/v1/projects/{id}/strings:update |
Update English source text of multiple strings (use string keys like 'login_welcome', not full paths) |
| Delete String | DELETE https://la.deltascripts.com/api/v1/projects/{id}/strings/{stringId} |
Permanently delete a string and all its translations (requires admin access) |