Translating labels

More
12 years 7 months ago #38243 by Rooney
Translating labels was created by Rooney
Hi,
I have searched and there are some older posts about this. Is there a way to translate labels. I know that I could just create a new field with a different label and assign it to a template, but at a certain point this is too much information for item editing. Is it not possible to override the information with a language string? Falang or Joomfish are not really solutions because it would be to take a sledgehammer to crack a nut...
Rooney

Joomla! 3.9.24 and FC 3.3.9

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #38248 by ggppdk
Replied by ggppdk on topic Translating labels
Hello,

-- in v2.0.2 you can use a a language string in order to translate the field 'label'

-- and in v2.0.3 you can use a language string for translating the field 'description' too


-- You can add the language string in any loaded language file


Currently this is recommended in our FAQ
... to add you language strings in files:


(frontend)
Add your language strings to files
JOOMLA_FOLDER/templates/mytemplate/language/en-GB/en-GB.com_flexicontent.ini
JOOMLA_FOLDER/templates/mytemplate/language/en-GB/fr-FR.com_flexicontent.ini

(backend)
Add your language strings to files
JOOMLA_FOLDER/administrator/templates/mytemplate/language/en-GB/en-GB.com_flexicontent.ini
JOOMLA_FOLDER/administrator/templates/mytemplate/language/en-GB/fr-FR.com_flexicontent.ini

NOTE 1:
- in v2.0.2 you have to load them manually in some PHP file
- in v2.0.3+ these files are loaded automatically

NOTE 2:
In v2.1.x: we will add editing of these files inside backend management not to have to edit them via FTP ...

Questions:
-1- i think to add loading of these in FLEXIcontent modules too (now only component loads them) ??

-2- Maybe move these file in a different folder ??? to make the independent of Joomla template ?? you see not all pages / menu item of Joomla use the same template so this will cause file not to load ... right?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #38251 by Rooney
Replied by Rooney on topic Translating labels
Hi,
Which string do I have to use to address the different field labels?
Why are we not using the standard Joomla language folder instead of the template folder?this would have the advantage to use the inbuilt language override already available in Joomla...
Rooney

Joomla! 3.9.24 and FC 3.3.9

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #38253 by ggppdk
Replied by ggppdk on topic Translating labels
Hello,

hhmm,

for some reason , i thought it did not work with overriding strings of the language files of flexicontent plugins loaded via the component,

but i tested and it works
in fact it works for all language files loaded at whatever point

-- I looked at Joomla's core code and it add the overrides on every language load , and not once ... maybe this a bit not optimal since it will apply override for all loaded language files, but it ensures that override takes priority always,


-- So, yes we can use the Joomla language overrides (file:)
language\overrides\en-GB.override.ini
administrator\language\overrides\en-GB.override.ini
because

1. The language override always take precedence
2. Our language strings are all prefixed with FLEXI_ so they cannot interfere with other 3rd party extensions e.g. if We had a language string 'BIG_TITLE' in 2 components then the Joomla override will effect them BOTH ... so no conflict in our case

-- i will scrap this feature from v2.0.3, and for J1.5 version will add manual loading of:
language\overrides\en-GB.override.ini
administrator\language\overrides\en-GB.override.ini


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #38258 by Rooney
Replied by Rooney on topic Translating labels

ggppdk wrote: 2. Our language strings are all prefixed with FLEXI_ so they cannot interfere with other 3rd party extensions e.g. if We had a language string 'BIG_TITLE' in 2 components then the Joomla override will effect them BOTH ... so no conflict in our case

-- i will scrap this feature from v2.0.3, but what language overrides about backend ?


Hmm, how to access a specific label? FLEXI_???. Using alias?
For backend, are overrides not working here?
Rooney

Joomla! 3.9.24 and FC 3.3.9

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #38268 by Rooney
Replied by Rooney on topic Translating labels
Just to make it more precise. I am using a file field called "downloads" and want to override the label of this field. What is the exact language string? How are the language strings for fields built anyway?

I do not know a lot about php, but is it possible to display all used strings on a rendered Joomla page?

Rooney

Joomla! 3.9.24 and FC 3.3.9

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #38285 by ggppdk
Replied by ggppdk on topic Translating labels
To find out the language strings used in a page do this:

1. In Joomla's Global Configuration, enable "Debug Language"

2. Refresh the frontend joomla page and all text that is produced via a language string will appear between dual stars e.g.:
**Read More ...**

3. Goto Joomla Language manager and goto Overrides:
Search for value: Read More ...
And you will see it is a language string FLEXI_READ_MORE
which you can load and set an override ...

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #38306 by Rooney
Replied by Rooney on topic Translating labels
I did this before. Debugging language has the result that the label is shown in question marks:
Code:
????Download????
which is correct related to Joomla help:

(text surrounded by pairs of question marks) indicates that the string is translatable but no match was found in the language definition file.

So, searching will not work because there is no string defined yet...

Searching for "Download" gives
Code:
FLEXI_CHOOSE_DIR
as a result!

Rooney

Joomla! 3.9.24 and FC 3.3.9

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #38307 by Rooney
Replied by Rooney on topic Translating labels
Wow. I just tried "Download" as string and it works. Without any FLEXI_. This is spooky...
The most spooky thing is that if I am changing the Label from "Download" to something else it is not working anymore.
So, actually I can create an override but not the field name, but the field label is taken as a string. Changing the label of the field changes the string...
I tried it. I changed the label of a related item field to "Download" and both, the related item and the file field label are translated with the set override.
This is not really practical.
Rooney

Joomla! 3.9.24 and FC 3.3.9

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #38312 by ggppdk
Replied by ggppdk on topic Translating labels

Rooney wrote: Wow. I just tried "Download" as string and it works. Without any FLEXI_.


i was speaking of built-in language strings

about field label it will be taken as it is
e.g. if you write as field label:
File Download
the the name of language string will be "File Download"
if you write:
FLEXI_File_Download_02
the the name of language string will be "FLEXI_File_Download_02" so i am not sure that i understand the comment about "FLEXI_"

And of course there are language string without FLEXI_, you found the String with name "Download" in some other extension, right? ... because no language string with such name inside FLEXIcontent language file


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save