Hello John,
I think that I have found the definitive solution to the problem to translate 'hardcoded' tokens of skins without making in depth changes in DA.
According to I understand, since to change the binarys of DA it is not a easy option, the solution would have to implement itself modifying only templates and the configuration files
Example of possible solution:
The example is based on the file '... /admin/show_admins.html' but he is extrapolateable to all the archives (and TOKENS) that need it.
Present file ' show_admins.html':
Suggested change:
HCT _ = Acronym of HardCoded Token
It would be necessary to add following to the file ' files_admin.conf ':
And to create the file 'lang/en/admin/show_admins_table.html' with the
following content:
The 'HCT_ANY_THING_TOKEN' it is what there would be to add to DA and it would always aim at the directory of the language selected by the user.
This way, to translate harcoded tokens, will be enough with using the macros|*if|*else|*endif|, for example, the version in other language of the previous file would be:
Using this system, it would be easy to totally translate DA to any language without never modify the original templates and only modifying the archives of the 'lang' dirs when updating the version.
John, you think that the idea is attainable?
Ramon
I think that I have found the definitive solution to the problem to translate 'hardcoded' tokens of skins without making in depth changes in DA.
According to I understand, since to change the binarys of DA it is not a easy option, the solution would have to implement itself modifying only templates and the configuration files
Example of possible solution:
The example is based on the file '... /admin/show_admins.html' but he is extrapolateable to all the archives (and TOKENS) that need it.
Present file ' show_admins.html':
Code:
|?TREE=» <a class=tree
href="/CMD_ADMIN_SHOW">`LANG_SHOW_ADMINS`</a>|
|?HELP_SECTION=`ADMIN_HELPER`/createa.html|
|HTM_ADMIN_TOP|
<a href="HTM_ACCOUNT_ADMIN_CREATE">|LANG_CREATE_ADMIN|</a><br>
<a href="HTM_ACCOUNT_ADMIN_DELETE">|LANG_DELETE_ADMIN|</a><br>
|TABLE|
|HTM_ADMIN_BOTTOM|
Code:
|?TREE=» <a class=tree
href="/CMD_ADMIN_SHOW">`LANG_SHOW_ADMINS`</a>|
|?HELP_SECTION=`ADMIN_HELPER`/createa.html|
|HTM_ADMIN_TOP|
<a href="HTM_ACCOUNT_ADMIN_CREATE">|LANG_CREATE_ADMIN|</a><br>
<a href="HTM_ACCOUNT_ADMIN_DELETE">|LANG_DELETE_ADMIN|</a><br>
[COLOR=darkred]|HCT_SHOW_ADMINS_TABLE|[/COLOR]
|HTM_ADMIN_BOTTOM|
It would be necessary to add following to the file ' files_admin.conf ':
Code:
HCT_SHOW_ADMINS_TABLE=admin/show_admins_table.html
following content:
Code:
|TABLE|
This way, to translate harcoded tokens, will be enough with using the macros|*if|*else|*endif|, for example, the version in other language of the previous file would be:
Code:
|$/usr/local/bin/php
<?php
$data = <<<END
|TABLE|
END;
$data = str_replace("english text", "other_language_text", $data);
echo $data;
?>
DONE|
John, you think that the idea is attainable?
Ramon
Last edited: