Added a safety check at the end of the getLng function. This check verifies if translations exist for the language portion of a locale (e.g., 'en' from 'en-US') when the full locale isn't found in the resources object. This prevents errors when translations exist for a base language but not for a specific regional variant.
Added a safety check at the end of the getLng function. This check verifies if translations exist for the language portion of a locale (e.g., 'en' from 'en-US') when the full locale isn't found in the resources object. This prevents errors when translations exist for a base language but not for a specific regional variant.
Demo gif:
Closes #2960