This project has moved and is read-only. For the latest updates, please go here.

Use language specific keywords instead of types?

Topics: Developer Forum
Jun 29, 2014 at 4:57 PM
Edited Jun 29, 2014 at 4:57 PM
In compiled documentation I see output like the following:
CalculateTileMatrix(Matrix4x4, TileFacing, Int32)
Is there a way to get this to read like the following instead?
CalculateTileMatrix(Matrix4x4, TileFacing, int)
Jun 29, 2014 at 6:23 PM
Only the syntax sections show the language-specific data types. Text within the topic tiles and bodies are more language neutral so use the underlying framework type. If you want language-specific text, you'd have to find all places where it renders a type and output language-specific elements instead. Maybe not impossible but certainly a lot of work.

Jun 30, 2014 at 6:40 PM
This is something which I would like to do but perhaps within my post-processor plug-in rather than by modifying the presentation stylesheets. Though given that this is going to take a little longer I shall defer this task until later.

I shall probably scan for all instances of "Int32" (along with namespace qualified variations) and replace with the C# syntax with a nice little wrapper element:
<span class="basic-type">int</span>
And then write a little JavaScript which maps the C# syntax to the other supported languages:
// Initialization
$('.basic-type').each(function() {
    var el = $(this);'type', el.text());

// Syntax switcher:
var languageBasicTypes = {
    "unityscript": {
        "bool": "boolean"
function resolveLanguageType(language, type) {
    language = languageBasicTypes[language];
    return language[type] || type;
$(document).on('syntax-switched', function(e, args) {
    $('basic-type').each(function() {
        var el = $(this);