For the current theme im creating there are multiple images that require to change based on the current language.
For example if the user is visiting the page in english we would load image_languageid.jpg
How can you replace languageid with the actual id of the language in velocity & liferay?
Is this a good technique or is there a nicer one?
Try adding this line in init_custom.vm or portal_normal.vm
#set ($language_id = $themeDisplay.getLanguageId())
Related
we have a webpage, where not all pages are translated. So many pages are only available in english and some special pages (country landing pages) are translated to various languages.
From these special translated pages I want to create links automatically converted to the default languages if the target page is not translated.
In menus (HMENU) "protectLvar = 1" works fine for me.
But how can I achieve this in normal typolinks or fluid "<f:link.page uid="..."> without manually dealing with the language ?
I'm on typo3 9.5.
Sample:
I have the following polish URL:
mydomain.com/pl/poland/
All the links from this page should go to "/en/subpage-xy/" because the above page is the only page translated to "pl". But actually all links go to "/pl/subpage-xy/" regardless if pages are translated to "pl".
The content-fallback mode leads to displaying english content under a /pl/-URL. I don`t want to change the fallback mode - I only want the links to be created to available language of the target page.
Is this possible ? Many thanks for any hints.
I think that you can't achieve what you want with default behavior.
I suggest you to wrote your own view helper based on <f:link.page> and in that view helper, you can check with a request in the DB if the page exist for the current language and switch to English if that's not the case.
I guess that you can also generate the link with typoscript with condition over page existence in current language but it's more tricky.
You have a sample here : check if current page is translated
I have a joomla website with 5 subtemplate K2.
The website is multilingual and I want to translate some sentences in subtemplate.
Where I can put this translation ?
I think it's in de-DE.com_k2.ini but in the next K2's update, sentence will be erase ?
Thank you for your time
You can either edit the appropriate files in
/language/overrides
or use the Language override feature in your administrator backend (Administrator-Extensions-Language management-Overrides). There you can search for text, find the language constants, and provide your custom localisations, which will persist across components' and Joomla! updates.
I have many label in my website and I am working with codeigniter!
My website has tree language, so the label title should change by changing language.
Now which way is better to keep higher performance for showing label title, from database or no just static pages?
Keep all labels in separate files like english.php, spanish.php etc.
In that language file define all labels with relavent text as below.
In english.php
define('WELCOME_MSG_GUEST','Welcome Guest!');
In spanish.php
define('WELCOME_MSG_GUEST','Welcome Guest! in Spanish');
Based on the selected language, include or load the language file.
Then you can use label constant in view as
echo WELCOME_MSG_GUEST;
I am using Confluence 4.0.3, I am trying to create a PDF layout/stylesheet so that it would grab the main title from the page content and move it to the title page.
What I have tried so far:
use the way that confluence suggests - it did not work well at all because it came with extra toc (np, I can hide it) and extra page content because it requires me to export from the parent level for it to work
I define a macro which contains the page title and I can use css to make it land on the title page. This works however if I was to export multiple docs this could pose a issue
Style the h1:first-child, this works but again on multiple docs this would be an issue.
Question: Is there a good way to do this on multiple doc exports? If not, does the page title have its own class that I can target instead of the h1:first-child? I tried h1.pagetitle (in their documentation) but it does not work, thanks
I used a user defined macro to put the title in and use the PDF export css to position it on the title page. This works as long as you are only exporting 1 document at the exporting level. If you are exporting 2 or more docs from the same exporting level then you can only define 1 of the macros or else they will all be at the same position on the title page.
This seems like the easiest way I found to implement something like this.
I would try employing a minor work-around. You could use a .asp page, which is located off of confluence, to pull the the pdf title and display it how you like. Then you can use an html-include macro to display the .asp page, and the pdf title it shows, wherever you like on confluence.
Maybe I'm just tired...but I can't seem to locate the language file relevant to the backend Customers>Manage Customers>Individual Record
I just want to change the form label "Suffix" to "Credentials".
Can you use inline translation to do it?