Changes

Jump to navigation Jump to search
update for SMAPI 3.0
Line 20: Line 20:     
===Check if a file exists===
 
===Check if a file exists===
{{SMAPI upcoming|3.0}}
  −
   
You can check if a file exists in the content pack folder using <tt>HasFile</tt>. You can specify a relative path like <tt>data/content.json</tt>.
 
You can check if a file exists in the content pack folder using <tt>HasFile</tt>. You can specify a relative path like <tt>data/content.json</tt>.
   Line 60: Line 58:     
===Get translations===
 
===Get translations===
{{SMAPI upcoming|3.0}}
  −
   
You can read translations from the content pack's <tt>i18n</tt> folder. This is identical to the [[Modding:Modder Guide/APIs/Translation|translation API]], but accessed through <tt>contentPack.Translations</tt>:
 
You can read translations from the content pack's <tt>i18n</tt> folder. This is identical to the [[Modding:Modder Guide/APIs/Translation|translation API]], but accessed through <tt>contentPack.Translations</tt>:
 
<source lang="c#">
 
<source lang="c#">
translators
8,403

edits

Navigation menu