<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>I18n on Interesting AI</title>
    <link>http://www.wfcoding.com/en/tags/i18n/</link>
    <description>Recent content in I18n on Interesting AI</description>
    <generator>Hugo -- 0.164.0</generator>
    <language>en-US</language>
    <copyright>火云</copyright>
    <lastBuildDate>Fri, 14 Aug 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="http://www.wfcoding.com/en/tags/i18n/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Centralized Configuration and I18n: Strictly Forbid AI Magic Values and Hardcoded Parameters</title>
      <link>http://www.wfcoding.com/en/articles/design/0114/</link>
      <pubDate>Fri, 14 Aug 2026 00:00:00 +0000</pubDate>
      <guid>http://www.wfcoding.com/en/articles/design/0114/</guid>
      <description>&lt;p&gt;AI (Artificial Intelligence) has a very common problem when writing code:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;It loves to &amp;ldquo;hardcode things on a whim.&amp;rdquo;&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;timeout&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;30&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;max_retries&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;3&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;model&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;qwen3:14b&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;raise&lt;/span&gt; &lt;span class=&#34;ne&#34;&gt;ValueError&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;User does not exist&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Individually, there&amp;rsquo;s nothing fundamentally wrong with any of these lines.&lt;/p&gt;
&lt;p&gt;But when dozens of modules each have their own &lt;code&gt;30&lt;/code&gt;, &lt;code&gt;3&lt;/code&gt;, model names, and prompt text, maintainers start getting headaches:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What do these values mean? Where should they be changed? What happens when switching environments? How do we support English?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Therefore, AI programming projects should establish a clear architectural rule upfront:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Values with business significance, environment-specific differences, or user-visible meaning are not allowed to be scattered across business code.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This problem is primarily addressed through two mechanisms:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Centralized Configuration + I18n (Internationalization).&lt;/strong&gt;&lt;/p&gt;
&lt;hr&gt;</description>
    </item>
  </channel>
</rss>
