<?xml version="1.0" encoding="UTF-8" ?><!-- generator=Zoho Sites --><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><atom:link href="https://blog.icefire.ca/blogs/tag/json/feed" rel="self" type="application/rss+xml"/><title>The PointFire Blog - The PointFire Blog for Multilingual SharePoint #JSON</title><description>The PointFire Blog - The PointFire Blog for Multilingual SharePoint #JSON</description><link>https://blog.icefire.ca/blogs/tag/json</link><lastBuildDate>Wed, 16 Jul 2025 08:12:30 -0700</lastBuildDate><generator>http://zoho.com/sites/</generator><item><title><![CDATA[Language-dependent JSON column formatting: this time it's the @UIlcid token]]></title><link>https://blog.icefire.ca/blogs/post/language-dependent-json-column-formatting-this-time-it-s-the-uilcid-token</link><description><![CDATA[<img align="left" hspace="5" src="https://blog.icefire.ca/Fri Aug 26 2022-2.png"/>This seems to have become a series, as Microsoft adds features to SharePoint JSON formatting.&nbsp; The previous installment is here .&nbsp; A week ago ]]></description><content:encoded><![CDATA[<div class="zpcontent-container blogpost-container "><div data-element-id="elm_s9K0Z5y6SfunuB9WMlDwDw" data-element-type="section" class="zpsection "><style type="text/css"></style><div class="zpcontainer-fluid zpcontainer"><div data-element-id="elm_SIBF4NPBRoaaMbW8OMWbJQ" data-element-type="row" class="zprow zprow-container zpalign-items- zpjustify-content- " data-equal-column=""><style type="text/css"></style><div data-element-id="elm_kOK6NuRXT4-WuwhumdTDAw" data-element-type="column" class="zpelem-col zpcol-12 zpcol-md-12 zpcol-sm-12 zpalign-self- "><style type="text/css"></style><div data-element-id="elm_5oRnlVMnSuKj3K0jKDMzvQ" data-element-type="text" class="zpelement zpelem-text "><style> [data-element-id="elm_5oRnlVMnSuKj3K0jKDMzvQ"].zpelem-text{ border-radius:1px; } </style><div class="zptext zptext-align-left " data-editor="true"><p>This seems to have become a series, as Microsoft adds features to SharePoint JSON formatting.&nbsp; The previous installment is <a href="/index#https%3A//blog.icefire.ca/blogs/post/language-dependent-json-column-formatting-using-the-lcid-token" title="here" rel="">here</a>.&nbsp; A week ago, Microsoft released a new @UIlcid token, which corrects the problem that I discussed in the previous post.&nbsp; This time, this token is the actual current language of the site, unlike the @lcid token that was available before.<br><br>So unlike the earlier post (<a href="/index#https%3A//blog.icefire.ca/blogs/post/language-dependent-json-column-formatting-using-the-lcid-token" title="read it now" rel="">read it now</a>) using &quot;@UIlcid&quot; rather than &quot;@lcid&quot; resolves all the issues about matching the Language and the Locale.&nbsp; The example is very similar to the previous post, and the effect is the same, just use&nbsp;<span style="color:inherit;">&quot;@UIlcid&quot; (Note: it's case-sensitive) rather than &quot;@lcid&quot; and you can replace the display of field values including choice columns with the translation without changing the value that is stored.</span><br><span style="color:inherit;"><img src="/Fri%20Aug%2026%202022.png" alt=""></span><br></p><p><span style="color:inherit;"><br></span></p><p><span style="color:inherit;">Does it apply to other places where the value appears?&nbsp; Yes!&nbsp; Well, most of the time.&nbsp; Does it work in &quot;new&quot; and &quot;edit&quot; panes?&nbsp; Yes!&nbsp; Below, both the selected and unselected values are translated.</span></p><p><span style="color:inherit;"><img src="/Fri%20Aug%2026%202022-1.png" alt=""></span><span style="color:inherit;"><br></span></p><p><span style="color:inherit;">Does it work for &quot;Type to filter&quot;?&nbsp; No.&nbsp; The filtering mechanism knows nothing about the translations.&nbsp; For that you would need to use multilingual managed metadata instead; it knows about translated values and can filter by them, and now column formatting works on that field type.</span></p><p><span style="color:inherit;"><br></span></p><p><span style="color:inherit;">Does it work in grid view?&nbsp; Yes it does!</span></p><p><span style="color:inherit;"><img src="/Fri%20Aug%2026%202022-2.png" alt=""></span><span style="color:inherit;"><br></span></p><p><span style="color:inherit;"><br></span></p><p><span style="color:inherit;">Does it work with Multi-select choice fields?&nbsp; No, but it could with a little extra effort.&nbsp; You would simply have to <a href="/index#https%3A//docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting%23simple-html-elements-formatting" title="use forEach and loopIndex" rel="">use <span style="font-family:&quot;Courier New&quot;, monospace;">forEach</span> and <span style="font-family:&quot;Courier New&quot;, monospace;">loopIndex</span></a>&nbsp;to go through the values and translate them individually, selected or not.</span></p><p><span style="color:inherit;"><br></span></p><p><span style="color:inherit;">As you may have guessed, automatically translating choice columns is an upcoming feature of PointFire 365, with lookup columns to follow.</span></p><p><span style="color:inherit;"><br></span></p><p><span style="color:inherit;"><br></span></p></div>
</div><div data-element-id="elm_rAkbVdurb5dippRX321gnw" data-element-type="text" class="zpelement zpelem-text "><style> [data-element-id="elm_rAkbVdurb5dippRX321gnw"].zpelem-text{ border-radius:1px; } </style><div class="zptext zptext-align-left " data-editor="true"><p><span style="font-weight:700;">Related Posts</span></p><div style="color:inherit;"><h1><div style="color:inherit;"></div></h1><h1><span style="font-family:&quot;Work Sans&quot;;font-size:16px;"><a href="https://blog.icefire.ca/blogs/post/localizing-group-by-headers-for-choice-columns-using-json-view-formatting" target="_blank" rel="">Localizing &quot;group by&quot; headers for choice columns using JSON view formatting in SharePoint Online</a></span></h1><h1><span style="font-size:16px;font-family:&quot;Work Sans&quot;;"><a href="https://blog.icefire.ca/blogs/post/language-dependent-json-column-formatting-using-the-lcid-token" target="_blank" rel="">Language-dependent JSON column formatting using the @lcid token</a></span></h1><div><h1><span style="font-size:16px;font-family:&quot;Work Sans&quot;;"><a href="https://blog.icefire.ca/blogs/post/json-for-different-text-in-different-languages" target="_blank" rel="">JSON for different text in different languages</a></span></h1></div></div></div>
</div></div></div></div></div></div> ]]></content:encoded><pubDate>Fri, 26 Aug 2022 16:11:46 -0400</pubDate></item><item><title><![CDATA[Language-dependent JSON column formatting using the @lcid token]]></title><link>https://blog.icefire.ca/blogs/post/language-dependent-json-column-formatting-using-the-lcid-token</link><description><![CDATA[Use JSON column formatting to display different text in different languages in SharePoint using the new @lcid token.]]></description><content:encoded><![CDATA[<div class="zpcontent-container blogpost-container "><div data-element-id="elm_LTnE7VNOSgasOwtENre72w" data-element-type="section" class="zpsection "><style type="text/css"></style><div class="zpcontainer-fluid zpcontainer"><div data-element-id="elm_LffkkLsnTCWTmi-PKYgBMg" data-element-type="row" class="zprow zprow-container zpalign-items- zpjustify-content- " data-equal-column=""><style type="text/css"></style><div data-element-id="elm_UtIjmF5hR2SXnvR9kU_VRw" data-element-type="column" class="zpelem-col zpcol-12 zpcol-md-12 zpcol-sm-12 zpalign-self- "><style type="text/css"></style><div data-element-id="elm_CVjGMNdsS6iePgZdenIIaA" data-element-type="text" class="zpelement zpelem-text "><style> [data-element-id="elm_CVjGMNdsS6iePgZdenIIaA"].zpelem-text{ border-radius:1px; } </style><div class="zptext zptext-align-center " data-editor="true"><div style="color:inherit;"><div style="color:inherit;"><div style="color:inherit;"><p style="text-align:left;">This is an update to my earlier blog post “<a href="https://blog.icefire.ca/blogs/post/json-for-different-text-in-different-languages" target="_blank" rel="">JSON for different text in different languages</a>”, where JSON column formatting is used to display different text in different languages. &nbsp;Please read that post before reading this one.&nbsp;</p><p style="text-align:left;"><span style="font-size:16px;">Since that post was published, a new “@lcid” token has become available.&nbsp; <a href="https://github.com/pnp/List-Formatting/tree/master/column-samples/number-localization" title="There is a sample here" target="_blank" rel="">There is a sample here</a>&nbsp;<span style="color:inherit;">by theChrisKent, and he demonstrates it in a <a href="https://www.youtube.com/watch?v=j6pvLx7qdCE" title="video here" target="_blank" rel="">video here</a></span></span></p><p style="text-align:left;"><span style="font-size:16px;">&nbsp;</span></p><p style="text-align:left;"><span style="font-size:16px;">The technique in the sample and the video sounds better than what I had described in my earlier post, doesn’t it?&nbsp; Except for one very important thing:&nbsp; the @lcid token does not match the user’s current language, or in technical terms the UI Culture.&nbsp; The @lcid token is the current locale of the session, sometimes called the region setting, which is a very different thing.&nbsp; It’s confusing because both the current <i>Language</i> and the current <i>Locale</i> use many of the same locale IDs, but the Language matches the language of user interface elements, while the locale only determines the formatting of dates, numbers, and currency.&nbsp; Locale has 209 possible values, but Language only supports 50 of these.&nbsp; The other 159 are not just other variants of the same language, they can be the same language but in a different jurisdiction with a different currency, the same language with different alphabets or alphabetical order, or other languages altogether.</span></p><p style="text-align:left;font-size:11pt;"><br></p><p style="text-align:left;"><span style="font-size:16px;">The user’s &nbsp;display Language, if it is set and matches one of the site’s alternate languages, always overrides the site’s base language, and the user can set any number of languages, letting an algorithm decide which one will be selected.&nbsp; Users can choose whether to have their Locale preference override the default site locale, and if they do they can only select one locale.&nbsp; The locale is independent of the language. You can set your language to Welsh and your locale to Urdu if you so wish.</span></p><p style="text-align:left;font-size:11pt;"><br></p><p style="text-align:left;"><span style="font-size:16px;">Language is a reliable indicator of the user’s current language on the current site.&nbsp; Locale is not.&nbsp; Using the @lcid token will choose the wrong language more often than not.</span></p><p style="text-align:left;font-size:11pt;"><br></p><p style="text-align:left;"><span style="font-size:16px;">Using the @lcid token only works if the Locale setting correctly reflects the current language.&nbsp; This is where PointFire 365 comes in.&nbsp; One of the lesser-known features of PointFire 365 is that it synchronizes the user’s locale with their language, and uses the user’s locale rather than the site locale.&nbsp; This is mostly so that date, number, and currency formatting will be correct for the user’s current language.&nbsp; Otherwise, you might get calendars with the names for months and days in the wrong language.&nbsp; Because of this PointFire 365 feature, the @lcid token will actually match the page language.</span></p><p style="text-align:left;"><span style="font-size:16px;">&nbsp;</span></p><p style="text-align:left;"><span style="font-size:16px;">So what does the use of the @lcid token in JSON column formatting look like in practice?&nbsp; Here is a new version of the sample code snippet that was used in the earlier post:</span></p></div></div></div></div>
</div><div data-element-id="elm_-0iSC6NZf04LIHl-Ji9S0A" data-element-type="image" class="zpelement zpelem-image "><style> @media (min-width: 992px) { [data-element-id="elm_-0iSC6NZf04LIHl-Ji9S0A"] .zpimage-container figure img { width: 624px !important ; height: 92px !important ; } } @media (max-width: 991px) and (min-width: 768px) { [data-element-id="elm_-0iSC6NZf04LIHl-Ji9S0A"] .zpimage-container figure img { width:624px ; height:92px ; } } @media (max-width: 767px) { [data-element-id="elm_-0iSC6NZf04LIHl-Ji9S0A"] .zpimage-container figure img { width:624px ; height:92px ; } } [data-element-id="elm_-0iSC6NZf04LIHl-Ji9S0A"].zpelem-image { border-radius:1px; } </style><div data-caption-color="" data-size-tablet="" data-size-mobile="" data-align="left" data-tablet-image-separate="false" data-mobile-image-separate="false" class="zpimage-container zpimage-align-left zpimage-size-original zpimage-tablet-fallback-original zpimage-mobile-fallback-original hb-lightbox " data-lightbox-options="
                type:fullscreen,
                theme:dark"><figure role="none" class="zpimage-data-ref"><span class="zpimage-anchor" role="link" tabindex="0" aria-label="Open Lightbox" style="cursor:pointer;"><picture><img class="zpimage zpimage-style-none zpimage-space-none " src="/JSON-colon-formatting.png" width="624" height="92" loading="lazy" size="original" data-lightbox="true"/></picture></span></figure></div>
</div><div data-element-id="elm_gBdYWzeKA1vJSzRHkAnPhA" data-element-type="text" class="zpelement zpelem-text "><style> [data-element-id="elm_gBdYWzeKA1vJSzRHkAnPhA"].zpelem-text{ border-radius:1px; } </style><div class="zptext zptext-align-left " data-editor="true"><div style="color:inherit;"><p><span style="font-size:16px;">Here, rather than checking the value of “Yes”, the JSON code is checking the value of @lcid.&nbsp; The code is just for two values of the field, “New application” and “Active”, but you get the idea.&nbsp; Here is what it looks like in English, French, and German.</span></p></div></div>
</div><div data-element-id="elm_C6RXMFdfPOpZZ8P6cHQkGQ" data-element-type="image" class="zpelement zpelem-image "><style> @media (min-width: 992px) { [data-element-id="elm_C6RXMFdfPOpZZ8P6cHQkGQ"] .zpimage-container figure img { width: 624px !important ; height: 176px !important ; } } @media (max-width: 991px) and (min-width: 768px) { [data-element-id="elm_C6RXMFdfPOpZZ8P6cHQkGQ"] .zpimage-container figure img { width:624px ; height:176px ; } } @media (max-width: 767px) { [data-element-id="elm_C6RXMFdfPOpZZ8P6cHQkGQ"] .zpimage-container figure img { width:624px ; height:176px ; } } [data-element-id="elm_C6RXMFdfPOpZZ8P6cHQkGQ"].zpelem-image { border-radius:1px; } </style><div data-caption-color="" data-size-tablet="" data-size-mobile="" data-align="left" data-tablet-image-separate="false" data-mobile-image-separate="false" class="zpimage-container zpimage-align-left zpimage-size-original zpimage-tablet-fallback-original zpimage-mobile-fallback-original hb-lightbox " data-lightbox-options="
                type:fullscreen,
                theme:dark"><figure role="none" class="zpimage-data-ref"><span class="zpimage-anchor" role="link" tabindex="0" aria-label="Open Lightbox" style="cursor:pointer;"><picture><img class="zpimage zpimage-style-box zpimage-space-none " src="/JSON-formatting-translation-english.png" width="624" height="176" loading="lazy" size="original" data-lightbox="true"/></picture></span></figure></div>
</div><div data-element-id="elm_IJuJCS-RufGWScxWmRU_Bw" data-element-type="spacer" class="zpelement zpelem-spacer "><style> div[data-element-id="elm_IJuJCS-RufGWScxWmRU_Bw"] div.zpspacer { height:30px; } @media (max-width: 768px) { div[data-element-id="elm_IJuJCS-RufGWScxWmRU_Bw"] div.zpspacer { height:calc(30px / 3); } } </style><div class="zpspacer " data-height="30"></div>
</div><div data-element-id="elm_3zKrLNAltVWagG0fJ_DovA" data-element-type="image" class="zpelement zpelem-image "><style> @media (min-width: 992px) { [data-element-id="elm_3zKrLNAltVWagG0fJ_DovA"] .zpimage-container figure img { width: 624px !important ; height: 166px !important ; } } @media (max-width: 991px) and (min-width: 768px) { [data-element-id="elm_3zKrLNAltVWagG0fJ_DovA"] .zpimage-container figure img { width:624px ; height:166px ; } } @media (max-width: 767px) { [data-element-id="elm_3zKrLNAltVWagG0fJ_DovA"] .zpimage-container figure img { width:624px ; height:166px ; } } [data-element-id="elm_3zKrLNAltVWagG0fJ_DovA"].zpelem-image { border-radius:1px; } </style><div data-caption-color="" data-size-tablet="" data-size-mobile="" data-align="left" data-tablet-image-separate="false" data-mobile-image-separate="false" class="zpimage-container zpimage-align-left zpimage-size-original zpimage-tablet-fallback-original zpimage-mobile-fallback-original hb-lightbox " data-lightbox-options="
                type:fullscreen,
                theme:dark"><figure role="none" class="zpimage-data-ref"><span class="zpimage-anchor" role="link" tabindex="0" aria-label="Open Lightbox" style="cursor:pointer;"><picture><img class="zpimage zpimage-style-box zpimage-space-none " src="/JSON-formatting-translation-french.png" width="624" height="166" loading="lazy" size="original" data-lightbox="true"/></picture></span></figure></div>
</div><div data-element-id="elm_asKxTKs0GYVi652Jw-a1zQ" data-element-type="spacer" class="zpelement zpelem-spacer "><style> div[data-element-id="elm_asKxTKs0GYVi652Jw-a1zQ"] div.zpspacer { height:30px; } @media (max-width: 768px) { div[data-element-id="elm_asKxTKs0GYVi652Jw-a1zQ"] div.zpspacer { height:calc(30px / 3); } } </style><div class="zpspacer " data-height="30"></div>
</div><div data-element-id="elm_4_rbl943cm3zFtQeLKhThg" data-element-type="image" class="zpelement zpelem-image "><style> @media (min-width: 992px) { [data-element-id="elm_4_rbl943cm3zFtQeLKhThg"] .zpimage-container figure img { width: 624px !important ; height: 178px !important ; } } @media (max-width: 991px) and (min-width: 768px) { [data-element-id="elm_4_rbl943cm3zFtQeLKhThg"] .zpimage-container figure img { width:624px ; height:178px ; } } @media (max-width: 767px) { [data-element-id="elm_4_rbl943cm3zFtQeLKhThg"] .zpimage-container figure img { width:624px ; height:178px ; } } [data-element-id="elm_4_rbl943cm3zFtQeLKhThg"].zpelem-image { border-radius:1px; } </style><div data-caption-color="" data-size-tablet="" data-size-mobile="" data-align="left" data-tablet-image-separate="false" data-mobile-image-separate="false" class="zpimage-container zpimage-align-left zpimage-size-original zpimage-tablet-fallback-original zpimage-mobile-fallback-original hb-lightbox " data-lightbox-options="
                type:fullscreen,
                theme:dark"><figure role="none" class="zpimage-data-ref"><span class="zpimage-anchor" role="link" tabindex="0" aria-label="Open Lightbox" style="cursor:pointer;"><picture><img class="zpimage zpimage-style-box zpimage-space-none " src="/JSON-formatting-translation-german.png" width="624" height="178" loading="lazy" size="original" data-lightbox="true"/></picture></span></figure></div>
</div><div data-element-id="elm_pMGxMmGiSLaR9vXJ5zN_hQ" data-element-type="spacer" class="zpelement zpelem-spacer "><style> div[data-element-id="elm_pMGxMmGiSLaR9vXJ5zN_hQ"] div.zpspacer { height:30px; } @media (max-width: 768px) { div[data-element-id="elm_pMGxMmGiSLaR9vXJ5zN_hQ"] div.zpspacer { height:calc(30px / 3); } } </style><div class="zpspacer " data-height="30"></div>
</div><div data-element-id="elm_VonfmjGQEypCeyzhe_PnRg" data-element-type="text" class="zpelement zpelem-text "><style> [data-element-id="elm_VonfmjGQEypCeyzhe_PnRg"].zpelem-text{ border-radius:1px; } </style><div class="zptext zptext-align-left " data-editor="true"><div style="color:inherit;"><div style="color:inherit;"><p><span style="font-size:16px;">The benefits of using this technique rather than the one in the earlier post are</span></p><ol><li><span style="color:inherit;">It is slightly shorter than before</span><br></li><li>It does not require an additional Yes/No column in the view</li><li>It can support all 50 SharePoint languages</li></ol><p><span style="font-size:16px;"><br></span></p><p><span style="font-size:16px;">The disadvantage (for some)</span></p><ul><li>It will usually not work without PointFire 365</li></ul><p><span style="font-size:16px;"><br></span></p><p>If you do not have PointFire 365, then the technique in the <a href="https://blog.icefire.ca/blogs/post/json-for-different-text-in-different-languages" title="earlier post" target="_blank" rel="">earlier post</a> is better.</p></div></div></div>
</div><div data-element-id="elm_j4T6mwQUKp8dA-rqBlj33g" data-element-type="text" class="zpelement zpelem-text "><style> [data-element-id="elm_j4T6mwQUKp8dA-rqBlj33g"].zpelem-text{ border-radius:1px; } </style><div class="zptext zptext-align-left " data-editor="true"><h1 style="line-height:1;"><span style="font-family:&quot;Work Sans&quot;;font-size:16px;font-weight:700;color:rgb(0, 0, 0);">Related Posts</span></h1><h1><div style="color:inherit;"></div></h1><h1><span style="font-family:&quot;Work Sans&quot;;font-size:16px;"><a href="https://blog.icefire.ca/blogs/post/localizing-group-by-headers-for-choice-columns-using-json-view-formatting" target="_blank" rel="">Localizing &quot;group by&quot; headers for choice columns using JSON view formatting in SharePoint Online</a></span></h1><h1><a href="https://blog.icefire.ca/blogs/post/language-dependent-json-column-formatting-using-the-lcid-token" target="_blank" rel="" style="font-family:&quot;Work Sans&quot;;font-size:16px;">Language-dependent JSON column formatting using the @lcid token</a><br></h1><h1 style="color:inherit;line-height:1;"><div style="color:inherit;"><div><div></div></div></div></h1><h1><span style="font-size:16px;font-family:&quot;Work Sans&quot;;"><a href="https://blog.icefire.ca/blogs/post/json-for-different-text-in-different-languages" target="_blank" rel="">JSON for different text in different languages</a></span></h1></div>
</div></div></div></div></div></div> ]]></content:encoded><pubDate>Tue, 05 Jul 2022 11:34:48 -0400</pubDate></item></channel></rss>