Closed rohanreddyg closed 3 years ago
raised pull request 84 for fixing this issue. Please accept and release a Nuget Package asap. https://github.com/AlexTeixeira/Askmethat-Aspnet-JsonLocalizer/pull/84
Thanks,
same issue with the last version of nuget package
@AlexTeixeira can you release the fix on nuget?
Same issue here. Is this going to be fixed?
Hi,
Sorry I was very busy this last few months.
I will update the nuget today.
Hi,
Getting exception while retrieving a localized string using GetString method of IStringLocalizer class. Below is the exception: Culture is not supported. (Parameter 'name')\r\n <FolderPartName" is an invalid culture identifier.
Root Cause: This exception occurs when a I18N JSON resource files with format like "localization.en-US.json" is in a folder path which has atleast one folder in the heirarchy with a dot (".") in its name. This is because filename splitter is assuming that only filenames will have dot in the absolute path. which may not be the case.
Fix: Fix is to use Path.GetFileName to first get filename from the absolute folder path and then try to retrieve the file culture details from last but one index of filename split array.