The game is a strategic showdown in which each player receives a random leader card, which is displayed publicly. The objective is to eliminate the enemy leaders before they eliminate yours.
To ensure consistent language display across all players in the game, the server should handle language selection for card information before sending data to the client. When the server retrieves a card, it should automatically select the text based on the client’s preferred language, which is stored with other settings in the localStorage. This way, each player sees the card’s name, description, and other text in their chosen language without extra requests or data processing on the client side.
Acceptance Criteria:
Client Language Preference: The server knows each client’s selected language, stored at session level.
Dynamic Language Retrieval: For each card request, the server fetches the data with text translated to the client’s preferred language.
Single Data Packet: The server sends only the translated card data (name, description) without including other languages.
No Client-Side Processing: The client receives fully translated card data, ready for display.
To ensure consistent language display across all players in the game, the server should handle language selection for card information before sending data to the client. When the server retrieves a card, it should automatically select the text based on the client’s preferred language, which is stored with other settings in the localStorage. This way, each player sees the card’s name, description, and other text in their chosen language without extra requests or data processing on the client side.
Acceptance Criteria: