I have a “Read More” variable:
<?php echo t("Read More"); ?>Is there any way to translate this? I have the site working multilingual but there is no “automated” translation even though it is a “t variable”.
/Carsten
I have a “Read More” variable:
<?php echo t("Read More"); ?>Is there any way to translate this? I have the site working multilingual but there is no “automated” translation even though it is a “t variable”.
/Carsten
Try using this code instead:
<?php echo t('Read More'); ?>
Note: single quotes instead of double quotes.
Look at the Translate Site Interface part of this page.
Have my multilingual settings, but it still won´t translate.
My “view.php” looks like this.
<p class="news-description">
<?php
// Get the full description
$fullDescription = $news->getCollectionDescription();
// Set a maximum length for the excerpt (e.g., 150 characters)
$maxLength = 150;
// If the description is longer, cut it and add "..."
if (strlen($fullDescription) > $maxLength) {
echo h(substr($fullDescription, 0, $maxLength)) . '...';
} else {
echo h($fullDescription);
}
?>
</p>
<p>
<a href="<?php echo h($news->getCollectionLink()); ?>" class="read-more">
<?php echo t('Read More'); ?>
</a>
</p>
If you email me I can take a look for you.
Just make sure you do this.
select the Reload Strings button to gather all of the untranslated strings from the default locale, then select the edit icon next to the locale you wish to translate.
And then once you have added the translation hit save then Save to file at the top.
Hi TM,
The issue is when i access this screen you showed above, is not what i see. I have nothing in either left or right side
Any advise?
/Carsten
Hi again,
I have this exact message. I am working in Localhost on Xampp server, and Chmod permissions are virtually impossible
/Carsten
Oh it looks like you first language is Danish. Hmmmm
what do you have here?
/index.php/dashboard/system/basics/multilingual
and what is in the folder
/application/languages/site/
Nothing at the moment. I can´t set chmod permission on this Windows 10 machine. So the folder “site” is completely empty.
Have been trying to find som .mo files but no luck
/Carsten
Download the english mo file from here:
https://translate.concretecms.org/translate/package/concrete5/dev-10.0
Hey Owl,
In this site, i see also “Danish”?
But should i download the .mo or .po file?
/Carsten
@EvanCooper can you help on this?
Since you built the site in the Danish language, that mo file would not be applicable.
So are you saying that translation is not possible, or am i going in a totally wrong direction?
/Carsten
I would expect the translation mechanisms to be able to work for a site which is primarily Danish.
Whilst the content may be in Danish, all the t() strings are English and the translation files will map them to Danish once it realises (is configured) it needs to translate.
The language system distinguishes between the dashboard language and front end language(s). I was muddled by that the first time I worked on a multilingual site.