Repository navigation
v2.2.0
MuscleLib API v2.2.0
This release introduces multilingual support improvements and a new localization architecture for exercise data.
Notable Changes
Spanish Support
The API now supports Spanish as a third language alongside English and Portuguese.
Spanish localization includes:
- Exercise names
- Exercise instructions
- Exercise attributes
- Filter values
- Error messages
- Search results
Spanish can be requested using:
GET /api/exercises?lang=es
The API also supports language detection through the "Accept-Language" header.
Localization Architecture
Exercise attributes are now stored using stable language-independent slugs and resolved through dedicated translation collections.
This applies to:
- Force
- Level
- Mechanic
- Equipment
- Category
- Muscles
This architecture makes the localization system more consistent and allows additional languages to be introduced without changing the underlying exercise data.
Search
Search has been updated to work with localized exercise names.
Queries can now be performed using the exercise name in the requested language, while results are returned according to the selected language.
Translation Cache
Translation data is loaded into an in-memory cache to reduce repeated database queries when resolving localized exercise attributes.
Tests
The test suite has been updated to cover the new localization architecture, including:
- Spanish language support
- Localized exercise data
- Translation resolution
- Localized filters
- Multilingual search
- Updated exercise data structure
Compatibility
Existing English and Portuguese integrations remain supported.
Language selection follows this priority:
- "lang" query parameter
- "Accept-Language" header
- English fallback
Examples:
GET /api/exercises?lang=en
GET /api/exercises?lang=pt
GET /api/exercises?lang=es
Documentation
The API documentation has been updated to include Spanish support, localized responses, language selection, and the updated localization behavior.
Upgrade Notes
No changes to existing English or Portuguese API requests are required.
Applications using the API without explicitly specifying a language will continue to receive English responses when no supported language is detected.
Links
- Documentation: https://libapi.vercel.app/docs
- Repository: https://github.com/MuscleLib/musclelib-api
Full Changelog: v2.1.0...v2.2.0