Page 1 of 1

Applying language-specific CSS

Posted: Mon Aug 05, 2019 6:56 am
by okonvick
When we translate a Flare project from English to Japanese, the used font (Calibri) becomes unusable, since Calibri does not support Japanese characters, which means that it falls down to the system default for Japanese characters, which looks ugly. Is there any way to specify which font to use for Japanese characters? Ideally already in the English original, without having to do any manual edits of the translated project after exporting from Lingo.

Re: Applying language-specific CSS

Posted: Mon Aug 05, 2019 3:31 pm
by SteveS
I'm not sure if this would work, but if the Japenese users are using a font that your English speaking users aren't (ie, it's not on their machines) could you use a font family, listing the Japenese font before the English?

Re: Applying language-specific CSS

Posted: Mon Aug 05, 2019 3:33 pm
by SteveS
You could also look at using conditions to specify a different style sheet depending on the language used by your target's audience.

Re: Applying language-specific CSS

Posted: Mon Aug 05, 2019 11:31 pm
by okonvick
Thanks for the advice. Actually, I wanted to stick with system fonts since I've had trouble embedding fonts that are not bundled with windows in the PDF (is it possible, by the way?). After some trying, it seems the simplest option is the right one:

Code: Select all

font-family: 'Segoe UI', 'Meiryo';

Re: Applying language-specific CSS

Posted: Sun Aug 11, 2019 3:38 pm
by techwriter31
In our projects, we include both English and translated stylesheets to handle this scenario.

For example, our English stylesheet is GlobalEN.css and our Japanese stylesheet is GlobalJA.css.

The GlobalEN.css includes all the style definitions for all mediums.

Then we include only the language-specific differences in the GlobalJA.css style sheet - we specify specific fonts for PDF mediums, we suppress italics, and we include Japanese translations for auto-text included in cross-references, note styles, etc. Then when we generate the Japanese output, we specify the GlobalJA.css as the stylesheet in the target file.

This allows us to maintain the majority of our styles for the various mediums in the English .css and still have separate translated stylesheets, with very little work on our part. It works great for us!

Here's an example:

Code: Select all

/*<meta />*/

@import url('GlobalEN.css');

i/*Suppressing italics in Japanese translated content.*/
{
	font-style: normal;
}

@media PDF_Manual
{
	body
	{
		font-family: 'IPAPGothic', 'MS Gothic';
	}
}
Note that the GlobalEN.css and GlobalJA.css files reside in the same directory.

Re: Applying language-specific CSS

Posted: Tue Sep 10, 2019 2:54 am
by okonvick
That sounds like a great advice, techwriter31! Just one thing - how do you apply conditions to what CSS files are used?

Re: Applying language-specific CSS

Posted: Tue Sep 10, 2019 3:44 am
by ChoccieMuffin
okonvick wrote:That sounds like a great advice, techwriter31! Just one thing - how do you apply conditions to what CSS files are used?
Not quite sure I've understood the question, but in each target on the General tab in the Master Stylesheet list click the appropriate language.