📉Languages - NKS0046
Use CultureManager.UpdateCulture
This analyzer provides the following strings:
Context | String |
---|---|
Error List | Caller uses |
Suggestion Box | Use |
Description |
|
Extended Description
This code analyzer detects the usage of CurrentUICulture
from the CultureInfo
class found in the System.Globalizaiton
namespace.
The CultureInfo.CurrentUICulture
property gives you your current UI culture for your applications. However, Nitrocid is not a GUI application, so we've decided to make our own culture handler that respects your kernel settings.
It's advisable to use the CultureManager.UpdateCulture()
function so that your mod can load a new culture and save the kernel settings to make this change permanent across reboots.
Analysis Comparison
To get a brief insight about how this analyzer works, compare the two code blocks shown to you below:
Before the fix
After the fix
Suppression
You can suppress this suggestion by including it in the appropriate place, whichever is convenient.
For more information about how to suppress any warning issued by the Nitrocid analyzer, visit the below page:
Recommendation
We recommend that every caller which use this function use the recommended abovementioned method.
Last updated