Class LangHelper

java.lang.Object
com.toxicrain.rainengine.core.LangHelper

public class LangHelper extends Object
  • Constructor Details

    • LangHelper

      public LangHelper(String baseName, Path directory, Locale locale)
      Constructs a LangHelper with external file support, locale selection, and auto-reload.
      Parameters:
      baseName - The base name of the properties files (e.g., "lang").
      directory - The directory containing the properties files.
      locale - The starting locale.
  • Method Details

    • get

      public String get(String key)
      Gets a property value by key.
    • changeLocale

      public void changeLocale(Locale locale)
      Changes the locale and reloads the properties file.
    • stopWatching

      public void stopWatching()
      Stops the WatchService (optional if you want to clean up threads on shutdown).