Translating labels

More
11 years 11 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
11 years 11 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...

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

More
11 years 11 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
11 years 11 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...

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

More
11 years 11 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
11 years 11 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.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.381 seconds
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